Repository navigation
lock-refresh: land main's refresh on the main it finds at push time (closes #15144) - #15151
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Closes #15144.
Root cause: a push run of lock-refresh takes 40 or more minutes. Its "Push to main" step could only land if main still pointed at the run's own commit. Main merges every few minutes, so the push was always rejected. Each run then left the job to "the run for the newer push", which hit the same rejection, so no run ever landed.
Fix: if the push is rejected because main moved, the job applies the downloaded records onto the main it finds at push time:
git reset --hardto the fetched mainnested_cache_updateThe records are still valid only if the host-dependent extension inputs have not changed since the recorded commit. After normalising on the new main, the job compares the digests of every
os:keyed extension entry. This is the same check ashost_dependent_extensions_are_locked_for_every_ci_platform. If the digests differ, the job lands nothing and the run for the newer push re-records.To make that one code path, the merge, normalise and nested steps are now a single
applyfunction in one step. The crate repin step, which runs only on dispatch, now runs before the merge. Normalisation still runs after it.Checks:
tools/dx check --affectedpasses except//tools/ci:config_consistency_test. That test fails on main with the stale rules_python entry this change lets lock-refresh fix. The jq check returnsfalsefor main's current lock andtruefor the lock before #15081.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvdpJxYihWhnWtH8yv