Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statuscake: Implement Equals function using TestTags #610

Merged

Conversation

matthijswolters-rl
Copy link
Contributor

This PR implements the Equals function in the statuscake operator. This ensures that the operator does not update all uptime checks during every round. Which could cause ratelimiting from Statuscake. My consideration for this implementation can be found below.

It is mentioned in a comment in the code itself but because of the discrepency between the fields in the EndpointMonitor CR and the Statuscake API it is not immediately clear how to compare an old monitor with an updated monitor. The way I have elected to check this is to use the TestTags field to include some kind of identifier that should be updated on any change. So if the tags have changed then the monitor should be updated.

I have added a comment in code to explain the reason for the implementation. Let me know if you have any other questions.

It is mentioned in a comment in the code itself but because of the
discrepency between the fields in the EndpointMonitor CR and the
Statuscake API it is not immediately clear how to compare an old monitor
with an updated monitor. The way I have elected to check this is to use
the TestTags field to include some kind of identifier that should be
updated on any change. So if the tags have changed then the monitor
should be updated.
@karl-johan-grahn karl-johan-grahn merged commit 7a3f1d0 into stakater:master Dec 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants