Repository navigation
Make main green again: history stats tests at night, and one Pages deploy at a time - #2598
Merged
Merged
Conversation
…ploy at a time The history stats set_period tests count from midnight on the real clock. Run between 23:00 and midnight in the tests' time zone, playing an hour crosses midnight and the counts come out short. They now run at noon on a fixed day. Since every commit on main gets a run of its own (#2578), two can deploy the website at once, and Pages refuses the second. The deploy job now waits for the one before it.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-timing and deployment-concurrency changes.
No open issues 🎉
What changed in this PR
Stabilizes history stats tests and prevents overlapping website deployments following the CI changes in #2578.
Changes:
- Freezes history stats tests at noon Pacific on a fixed day to avoid midnight-related failures.
- Serializes Pages deployments without cancelling the active deployment.
| File | Description |
|---|---|
tests/ectoplasms/history_stats/services/test_set_period.py |
Adds a module-wide frozen clock for deterministic tests. |
.github/workflows/documentation.yaml |
Adds a shared pages concurrency group to the deploy job. |
Review effort: Balanced
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
tests/ectoplasms/history_stats/services/test_set_period.pyruns at noon on a fixed day (pytest.mark.freeze_time), instead of on the real clock.pagesconcurrency group for the deploy before it.Motivation and Context
Main is red twice over.
The history stats sensor in these tests counts from midnight (
today_at()). The tests run on the real clock, in the tests' time zone, US/Pacific. Between 07:00 and 08:00 UTC it is past 23:00 there, so playing one hour crosses midnight and only the minutes before it count:0.21instead of1.00. Red for that hour every night, green after it.Since #2578 every commit on main gets a run of its own, so two of them can deploy the website at once. Pages refuses a second deployment while one runs.
How has this been tested?
The three failures reproduced locally inside that hour. With the fix, all 34 history stats tests pass in it. Frozen at 23:30 Pacific instead, the same three fail exactly as on CI, so the clock is the cause. zizmor finds nothing in the workflow.
Screenshots (if appropriate):
Types of changes
Checklist
documentation/translations/output/.