fix: [proxy/engines] dpc chunk test wallclock dependency#1013
Closed
crandles wants to merge 3 commits into
Closed
Conversation
Signed-off-by: Chris Randles <randles.chris@gmail.com>
Signed-off-by: Chris Randles <randles.chris@gmail.com>
…lclock gate Signed-off-by: Chris Randles <randles.chris@gmail.com>
Contributor
Author
|
merged to #1012 |
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
Three chunk tests in
pkg/proxy/engines/deltaproxycache_chunk_test.gohardcodenow := time.Date(2026, 4, ...)and fail once real wallclock moves paststep * TimeseriesRetention(1h * 1024 = ~42.67d) beyond the fixture date.TestDeltaProxyCacheRequestRangeMissChunksstarted failing locally around 2026-05-25, the two_CrossBucketsiblings would have followed a few days later.The trigger is the
EvictionMethodOldestbranch in deltaproxycache.go:238-251 --OldestRetainedTimestampis computed fromtime.Now(), so a fixed-calendartrq.Extent.Endeventually slides before it and DPC short-circuits toDoProxy(engine=HTTPProxy, status=proxy-only). The fixture comment about the "17.5d chunk bucket" was about a different thing (chunk size = step *DefaultTimeseriesChunkFactor); it isn't what was tripping the test.First commit is intentionally empty so CI captures the failure on a clean branch off main, leaving a permanent record of the time bomb. Second commit replaces the hardcoded dates with two helpers anchored to
time.Now():chunkBucketAnchor(step)for the single-bucket case (TestDeltaProxyCacheRequestRangeMissChunks) -- midpoint of a recently-completed chunk bucketchunkBucketStraddle(step)for the cross-bucket cases -- 11h after a recent chunk-bucket boundary so Q1 (-30h..-12h) and Q2 (-10h..-8h) fall on opposite sidesBoth helpers stay well inside the retention window so future wallclock drift can't reintroduce the same failure.
Type of Change
AI Disclosure