Repository navigation
Anchor the Lite CPU-spike scenario to a UTC-day boundary - #4385
Merged
Merged
Conversation
erikdarlingdata
marked this pull request as ready for review
September 26, 2026 04:19
This was referenced Sep 26, 2026
erikdarlingdata
added a commit
that referenced
this pull request
Sep 28, 2026
…s at any hour (#4558) Lite tests: the FinOps tests' reads cover their seeded rows at any hour. TestDataSeeder anchors its period end to the most recent UTC midnight plus 4 hours, so the CPU-spike scenario lines up with a UTC day (#4385), and the high-impact seed stamps its rows 30 minutes before that. FinOpsTests read those rows with a fixed 24-hour lookback from now, so between 03:30 and 04:00 UTC the rows fell outside the window and HighImpactSkew_DominantQueryScoresHighest and HighImpactSkew_DominantQueryHighScore failed. - RunHighImpactAsync now computes its lookback from now back to TestDataSeeder.TestPeriodStart, plus an hour, unless a test passes one explicitly. The seeder's anchor is unchanged. - HighImpactWindowCoversSeedAtWorstHour checks the window still covers the seed at 03:59 UTC. - CleanServer_NoDuckDbRecommendations failed the same way: the utilization read uses a fixed 24-hour window with no parameter, so with no CPU samples in it the engine saw 0% CPU and recommended downsizing. SeedCleanFinOpsServerAsync now also seeds the same flat 50% CPU signal over the last three hours; it stays flat, like the original seed, so the reserved-capacity stability rule (which needs a nonzero standard deviation) does not fire. The other FinOps and recommendation scenarios read 7-day windows and are not affected.
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.
Test-only; no product change and no CHANGELOG entry.
The Lite CPU-spike scenario tests seeded a 24-hour baseline ending at
DateTime.UtcNow - 4h. The CPU and I/O-latency baselines are cached by UTC day (#4248), so their query window ends at midnight UTC of the analysis period's start. When the suite ran shortly before 04:00 UTC, that midnight fell almost a full day before the seeded baseline's end. The baseline was then nearly empty, andANOMALY_CPU_SPIKEnever fired.TestDataSeedernow anchors the scenario period's end to 04:00 UTC of the current day, or of the previous day before 04:00, so the period start lands exactly on a UTC midnight at any time of day.