fix: keep metrics page consistent with the weekly email#1962
Merged
alanpeixinho merged 3 commits intoJun 26, 2026
Conversation
6d048d3 to
578873a
Compare
The dashboard window ended on Sunday instead of Saturday, so mid-week it requested a different window than the email and missed the warmed cache key. Align the exclusive end to the most recent Saturday so the page matches the email window and hits the warm cache. Part of kernelci#1961 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Warm the cache on web-server startup (gunicorn/runserver only, single-flight via a Redis lock) so a mid-week deploy doesn't leave the page on the short-lived cache until the next Saturday cron. Align the warm window to the latest Saturday so it targets the same Sat-Fri window the dashboard requests instead of a rolling 7-day window. Part of kernelci#1961 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Query-level cache in get_metrics_data is enough; view_cache added a second layer that could serve stale responses after the warmed query cache updates. Closes kernelci#1961 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
578873a to
4e76cbe
Compare
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.
Summary
Keeps the metrics page and the weekly email showing the same Sat–Fri window,
and keeps the page responsive even on a cache miss.
window and hits the warmed cache.
Test plan
Closes #1961