Repository navigation
Darling.Tests: settle the compression self-heal healthy-job assertion (gated-live flake) - #1604
Merged
Merged
Conversation
…t's healthy-job assertion The CompressionJobSelfHeal gated-live test asserts a freshly-applied compression policy job is NOT flagged as stuck. But a just-added TimescaleDB job can momentarily read next_start = '-infinity' in job_stats before its background scheduler assigns the first real next run - and the stuck-job detector is CORRECT to flag -infinity - so asserting immediately after ApplyCompressionPolicy raced that window and intermittently false-failed on a slow CI runner. Fix: arm the job with a real future next_start (via the same alter_job the self-heal uses), then wait for the catalog to reflect a non-(-infinity) next_start before the "not flagged" assertion. Bounded to 30s, failing loudly if it never settles (a job that stays -infinity IS genuinely stuck and must not silently pass). Test-only; the detector and self-heal are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sion-selfheal-flake
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Why
The
CompressionJobSelfHealgated-live test (*_AgainstDevPostgres, real TimescaleDB) asserts a freshly-applied compression policy job is not flagged as stuck. But a just-added TimescaleDB job can momentarily readnext_start = '-infinity'injob_statsbefore its background scheduler assigns the first real next run — and the stuck-job detector is correct to flag-infinity— so asserting immediately afterApplyCompressionPolicyraced that window and intermittently false-failed on a slow CI runner.Fix
Deterministically settle the job into the healthy state the assertion is actually about: arm it with a real future
next_start(via the samealter_jobthe self-heal uses), then wait for the catalog to reflect a non-(-infinity)next_startbefore the "not flagged" assertion. Bounded to 30s, failing loudly if it never settles — a job that stays-infinitygenuinely IS stuck and must not silently pass.Test-only. The detector (
ReadStuckCompressionJobsAsync) and the self-heal path are unchanged. Related to the #1585/#1586/#1588 compression self-heal work.Verification
Builds clean against current dev (0 errors). The authoritative check is CI's
darling-pgjob, which runs this gated-live test against real TimescaleDB (locally it skips withoutDARLING_TEST_PG).🤖 Generated with Claude Code