Commit 56d8154
Fix CI: relax FinOps memory sample-count guard, seed enough rows in tests
PRs erikdarlingdata#918 and erikdarlingdata#920 added a sample-count guard (>= 500) to the new 7-day P95
memory recommendation logic. 500 was overly conservative and broke the
Lite FinOps test OverProvisionedEnterprise_MemoryRightSizingFires, which
seeds a single memory_stats row.
The real protection added by those PRs was switching from TOP 1 to P95;
the sample minimum is just a sanity check against degenerate single-point
inputs. ~16 samples is enough to compute a meaningful P95 and matches the
shape of SeedCpuUtilizationAsync's 16-row fixture, so tests can fire the
recommendation without artificial inflation.
- Lower threshold from 500 to 16 in both Dashboard and Lite (checks #3
and erikdarlingdata#12) so the value reflects the actual ask: "more than one reading"
rather than "8+ hours of data."
- Update Lite's SeedMemoryStatsAsync to insert 16 rows across the test
period (matching SeedCpuUtilizationAsync's pattern). This makes
OverProvisionedEnterprise_MemoryRightSizingFires pass again and keeps
CleanServer_NoDuckDbRecommendations green (still no rows seeded for
the clean scenario → P95 returns NULL → no recommendation).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7410bc5 commit 56d8154
3 files changed
Lines changed: 33 additions & 21 deletions
File tree
- Dashboard/Services
- Lite
- Analysis
- Services
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
534 | | - | |
535 | | - | |
| 537 | + | |
| 538 | + | |
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | | - | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
889 | 891 | | |
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
893 | 895 | | |
894 | 896 | | |
895 | 897 | | |
896 | | - | |
897 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
898 | 902 | | |
899 | 903 | | |
900 | 904 | | |
901 | 905 | | |
902 | 906 | | |
903 | 907 | | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
913 | 918 | | |
914 | | - | |
| 919 | + | |
| 920 | + | |
915 | 921 | | |
916 | 922 | | |
917 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
228 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
556 | | - | |
557 | | - | |
| 559 | + | |
| 560 | + | |
558 | 561 | | |
559 | 562 | | |
560 | 563 | | |
| |||
0 commit comments