mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #849] Revert API-breaking changes. #597
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#597
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mtesch-um on GitHub (Jun 23, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/849
The API was changed in a non-backward compatible way with the recent changes to auto-create slugs. The documentation hasn't even been updated to match the new API.
We're paying customers and want a stable API.
Would you be able to revert the changes to the auto-creation?
The current documentation, upon which we rely:
@mtesch-um commented on GitHub (Jun 23, 2023):
Suggest making auto-creation of slugs an opt-in feature that wont break code that relies on getting a 404 for a non-existent slug.
@cuu508 commented on GitHub (Jun 26, 2023):
You are right, I made a backwards-incompatible behavior change regarding the handing of non-existent slugs. Before the change, pinging a non-existent slug returned HTTP 404. After the change, Healthchecks auto-provisions the check and returns HTTP 200. I should have been more careful about rolling out this change, and I am sorry for the disruption.
Long-term, I want auto-provisioning be the default, and, ideally, the only mode.
I'm assuming your use case is (please correct me if I'm wrong):
And the problem with auto-provisioning and the 200 responses is, you now cannot easily detect if a check was just created and needs to be configured. If that's the case, I have a couple of ideas:
Improve the auto-provisioning code to return HTTP 201 instead of HTTP 200 if a check was just created. This would allow you to detect if a check was just created. Instead of checking for 404, you would check for 201. I can implement this relatively quickly.
I'm considering adding ability to configure some aspects of the check when auto-provisioning it like so:
Perhaps there should also be a way to say "and please do not assign any channels to it":
If the above examples were implemented, perhaps you would not need the configure step any more?
Something I personally find useful in terms of check organization is to organize checks and integrations in projects so that all checks in a project use all integrations. For example, suppose I have a project with 51 checks and 2 integrations (email and SMS). 50 of the checks use ony the email integration, and one check uses the SMS integration. In this case I would move the one check and its integration to a separate project. I can then add new checks in the project and not worry about deselecting the SMS integration for every new check.
@bdd commented on GitHub (Jun 26, 2023):
Following Pēteris's contribution, I made a prerelease of runitor supporting 201 response code so it doesn't think ping failed. If you use runitor, I'd appreciate testing reports of v1.3.0-beta.1. If no issues are found I intend to cut v.1.3.0 on Wednesday (PDT morning, UTC early evening).
@cuu508 commented on GitHub (Jun 27, 2023):
I changed the auto-provisioning logic to make it opt-in:
No auto-provisioning:
With auto-provisioning:
This is deployed to healthchecks.io, and the the documentation is also updated to match.