Commit e026a5b
authored
fix: keep metrics page consistent with the weekly email (#1962)
* fix(metrics): correct dashboard week boundary to Saturday
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 #1961
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
* fix(metrics): warm the metrics cache on server startup
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 #1961
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
* fix(metrics): drop HTTP cache on metrics endpoint
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 #1961
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
---------
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>1 parent 5ef7b2b commit e026a5b
4 files changed
Lines changed: 37 additions & 18 deletions
File tree
- backend/kernelCI_app
- queries
- dashboard/src/pages/Metrics
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
752 | 758 | | |
753 | 759 | | |
754 | 760 | | |
| |||
1068 | 1074 | | |
1069 | 1075 | | |
1070 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
1071 | 1079 | | |
1072 | 1080 | | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
| 1081 | + | |
| 1082 | + | |
1076 | 1083 | | |
1077 | 1084 | | |
1078 | 1085 | | |
1079 | | - | |
1080 | | - | |
| 1086 | + | |
| 1087 | + | |
1081 | 1088 | | |
1082 | 1089 | | |
1083 | 1090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 182 | + | |
188 | 183 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 554 | + | |
| 555 | + | |
559 | 556 | | |
560 | 557 | | |
561 | 558 | | |
| |||
0 commit comments