v3.3.0
Renamed service
to endpoint
#191 #192
THIS CHANGE IS BACKWARD COMPATIBLE
I've been wanting to rename service
to endpoint
for a while now.
service
is confusing, and it doesn't align well with features I want to implement in the future.
As such, I finally decided to make the move.
What you need to know
For most people, all you need to do is replace services:
by endpoints:
in your configuration file, but here's a full break down of the changes that may impact you.
Endpoint changes
All /api/v1/services/*
routes will continue working until v4.0.0 for the sake of backward compatibility, but should be replaced by /api/v1/endpoints/*
.
This includes badges.
Configuration changes
services
has been renamed to endpoints
, but the former will continue being supported until v5.0.0. This is a pretty big breaking change, and I want people to have enough time to migrate.
Before:
services:
- name: website
url: "https://twin.sh/health"
conditions:
- "[STATUS] == 200"
After:
endpoints:
- name: website
url: "https://twin.sh/health"
conditions:
- "[STATUS] == 200"
If you continue using services
in your configuration, there will be a warning logged in the console pointing to this issue
Storage
SQLite and Postgres
If you are using a storage of type sqlite
or postgres
, the data in the old tables will not be migrated. I considered automatically migrating the data, but decided that it was not worth the trouble given that currently, the retention period is very short.
That being said, the old tables are not going to be automatically deleted, in case you are using said data for other purposes.
Here is a list of the old table names and their replacements:
- service -> endpoints
- service_event -> endpoint_events
- service_result -> endpoint_results
- service_result_condition -> endpoint_result_conditions
- service_uptime -> endpoint_uptimes
If you have any questions, please ask them in #191