Fix retry queue in preresolved lazy loading mode#377
Open
danielahrnsbrak wants to merge 1 commit intomainfrom
Open
Fix retry queue in preresolved lazy loading mode#377danielahrnsbrak wants to merge 1 commit intomainfrom
danielahrnsbrak wants to merge 1 commit intomainfrom
Conversation
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.
Summary
KeyErrorcrash when a Buildkite job is manually retried in preresolved-tests modeStatic#requeueto push back original entry with file path instead of bare test IDProblem
When a CI job using
--preresolved-testsis manually retried, the retry crashes with:Root cause:
Retryinheritsstream_populatefromStatic, soQueuePopulationStrategy#populate_queueoverwrites the retry queue's failed test entries with the full preresolved test list, thenStatic#pollcrashes onindex.fetchbecause the index wasn't built for those entries.Fix
Retry#stream_populate— Override as no-op so the retry queue's pre-populated failed entries aren't replaced.configure_lazy_queuestill setsentry_resolver, sopolllazily resolves each entry.Worker#retry_queue— Preserve full queue entries (with file paths) instead of stripping to bare test IDs. Usesuniq!with block for idiomatic dedup by test ID.Static#requeue— Track original queue entries duringpolland push them back on requeue, preserving file paths and load-error payloads for subsequent retry attempts.Version bump — 0.83.0 → 0.84.0
What's NOT changed
Retry#populateis intentionally left intact — RSpec and non-lazy Minitest retries callpopulateto build the@indexfor yielding runnable test/example objects. Those paths use bare test IDs that match index keys correctly.Test plan
Retry#stream_populateno-op,pollwithentry_resolver,populatestill builds index for eager mode, bare test ID backwards compatibility, requeue preserves full entriesstream_populate→poll→retry_queue,stream_populateno-op on retry, end-to-end withentry_resolver, multiple failure dedup