Conversation
Interval schedules were truncated to the largest unit they exceed, so a 90-minute schedule was reported as 1 hour and a 36-hour one as 1 day. Use the largest unit that divides the interval evenly instead, and send no monitor config (with a warning) if it isn't a whole number of minutes. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Codecov Results 📊✅ 133361 passed | ⏭️ 7222 skipped | Total: 140583 | Pass Rate: 94.86% | Execution Time: 441m 8s 📊 Comparison with Base Branch
➖ Removed Tests (1)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2562 uncovered lines. Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
- Coverage 90.37% 90.35% -0.02%
==========================================
Files 202 203 +1
Lines 26552 26556 +4
Branches 9858 9860 +2
==========================================
+ Hits 23997 23994 -3
- Misses 2555 2562 +7
- Partials 1487 1487 —Generated by Codecov Action |
Matches the sub-minute warning. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes Celery beat interval schedules being rounded down. A 90-minute schedule was sent as "1 hour" and a 36-hour one as "1 day", so Sentry expected runs that never happened and raised false missed-check-in alerts.
Intervals now use the largest unit that divides them evenly (90 minutes stays 90 minutes). Intervals that aren't a whole number of minutes, such as 90 seconds, send no monitor config and log a warning, like sub-minute intervals already do.
Existing monitors with uneven intervals get the correct interval on their next check-in. For intervals that now send no config, new monitors aren't auto-created and existing ones keep their current schedule.
Testing
Unit tests for the interval conversion and the beat monitor config.