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

Crons: Do not mark late success as "okay" #44393

Open
evanpurkhiser opened this issue Feb 10, 2023 · 3 comments
Open

Crons: Do not mark late success as "okay" #44393

evanpurkhiser opened this issue Feb 10, 2023 · 3 comments
Assignees

Comments

@evanpurkhiser
Copy link
Member

Currently there exists a scenario where you may start a job far before the expected check in time, and if it completes near the checkin time OR after the check in time (after it was marked missed) the status of the monitor will be updated to successful.

Imagine a crontab monitor configured as 0 * * * *. This cron monitor should run on the hour every hour. You have also configured a 5 minute checkin margin.

In this scenario...

  1. A checkin has happened at 12:40 (a good 20 minutes before expected)
  2. At 01:05 the expected checkin at 01:00 is marked as missed since no checkin happened within the 5 minute checkin margin.
  3. Finally the job started at 12:40 completes, and now the monitor is marked as having been "successful"

Existing world

This is not quite right, as the monitor actually started much earlier than it should have. If it had run faster and completed BEFORE 1:00 it would not have been accounted for the 1:00 checkin at all.

Proposed new world

We should not update a monitors due to checkins that started before the expected checkin time.

@evanpurkhiser
Copy link
Member Author

Example of some real usage confusion because of this #42283 (comment)

@getsantry
Copy link
Contributor

getsantry bot commented Sep 7, 2023

Routing to @getsentry/product-owners-crons for triage ⏲️

@evanpurkhiser
Copy link
Member Author

This is somewhat related to #44387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Candidates
Development

No branches or pull requests

2 participants