Repository navigation
[CI] Fix viable/strict freeze: tag the newest push-green candidate instead of the raw tip of main - #25684
[CI] Fix viable/strict freeze: tag the newest push-green candidate instead of the raw tip of main#25684Gasoonjia wants to merge 2 commits into
Conversation
…asing the tip of main viable/strict froze for ~4 days on a 2026-11-19 commit (c29858d) while main moved ~170 commits ahead, so executorch nightlies cut from viable/strict shipped stale bytes under a new date. There is no single blocking PR (the QNN blocker #25424 has merged): ~57 candidates fail for ~22 mostly flaky reasons, and 5 of 7 sampled commits were green on every push-side required check, missing only the gate row. Root cause: promote-to-viable-strict.yml tagged the tip of main every 4 hours. The tip advances 100+ commits a day while full CI takes hours, so each new tick replaced the candidate before its required checks finished and candidates kept dying halfway. Scheduled runs now (1) keep evaluating the oldest tagged candidate still ahead of viable/strict, using the existing ciflow/trunk/<sha> tags as the persisted candidate set, (2) tag the oldest commit ahead of viable/strict that is at least CANDIDATE_MIN_AGE_HOURS (6h) old, never the tip, and (3) abandon a candidate older than CANDIDATE_LOCK_TIMEOUT_HOURS (24h, from commit time) by leaving its tag as a tombstone and tagging the next-oldest aged commit, so one red/flaky commit cannot block advancement forever. cancel-in-progress was already false and stays false. A hand dispatch with an explicit SHA bypasses selection as before. Scope: only .github/workflows/promote-to-viable-strict.yml changes. The required-check set in update-viablestrict.yml and the advancement logic in pytorch/test-infra (update-viablestrict action) are untouched; this PR does not change which checks gate viable/strict.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25684
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit da3cd79 with merge base 0986bc8 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@claude review effort=max |
|
Claude finished @Gasoonjia's task in 30m 2s —— View job Review of PR #25684
Summary: The new selection always tags the oldest commit and only one per run, so Detailed reviewPR Review: #25684SummaryThe PR changes scheduled promotion. It used to tag the tip of
Infrastructure
Backward Compatibility
Code Quality
Specific Comments
RecommendationRequest Changes The two blockers mean that, once merged, the scheduled path would advance What I couldn't verify:
|
…oldest Address review on the previous version: tagging the oldest commit caps advancement at one commit per tick (the updater promotes the newest fully green commit, so oldest-first can never catch up), and it tags intermediate commits of multi-commit pushes, which never receive push-side pull/Lint/Build documentation rows (push workflows run only for the head of a push) and can never be promoted. Scheduled runs now walk newest-first from viable/strict to main and tag the first commit that is at least CANDIDATE_MIN_AGE_HOURS old, not already tagged, and green on all three push-side required workflows with no failed run (queried with gh api, mirroring the updater's one-failure-is-fatal semantics; needs actions: read for GITHUB_TOKEN). The commit-age lock and tombstones are removed: a red candidate cannot block newer ones because each tick re-picks the newest eligible commit. Manual dispatch without a SHA promotes the tip again, the redundant git fetch is removed, and the tag notice now correctly lists pull/Lint/Build documentation as push-side checks. Selection logic re-verified in a scratch repo with a stubbed gh: youngest commits are skipped by age, already-tagged commits are skipped, and the newest push-green aged commit is selected (NONE when no commit qualifies).
Summary
Fix the
viable/strictpromotion freeze by changing how.github/workflows/promote-to-viable-strict.ymlpicks the commit it tags. One file changed; no required-check changes; nopytorch/test-infrachanges. The advancement step (.github/workflows/update-viablestrict.yml→pytorch/test-infra/.github/actions/update-viablestrict) was located during investigation and deliberately not touched.Update: an earlier version of this PR tagged the oldest aged commit behind a commit-age lock. Review (thanks @claude) showed that caps advancement at one commit per tick — the updater promotes the newest fully green commit — and tags intermediate commits of multi-commit pushes, which never receive push-side
pull/Lint/Build documentationrows (push workflows run only for the head of a push) and can never be promoted. This version implements the corrected selection below.Problem (HUD freeze + root cause)
Per HUD,
viable/strictsat on a 2026-11-19 commit (c29858d) for ~4 days whilemainmoved ~170 commits ahead; nightlies cut fromviable/strictshipped stale bytes. No single PR blocked it (QNN blocker #25424 merged): candidates died on scattered flaky reds (~22 distinct reasons), on push-side rows that were still running or already red, and on commits that could never be promoted at all. A one-off manual dispatch (PR #25525's commit) has since advancedviable/stricttoa272663; this PR is the structural fix so it does not freeze again.Old vs new behavior
mainevery 4h tick, regardless of its CI stateviable/strictthat is ≥CANDIDATE_MIN_AGE_HOURS(6h, whole hours) old, untagged, and green on all push-side required workflows (pull,Lint,Build documentation) with no failed runcancel-in-progress: falseschedule)The push-side query mirrors
update-viablestrict.yml's own API usage and the updater's one-failure-is-fatal semantics; it needsactions: readforGITHUB_TOKEN(added;contentsstays read-only, tag push still uses the bot token). The walk is capped at 50 commits per tick.Simulation walkthrough (verified locally)
Selection block exercised verbatim in a scratch repo with a stubbed
gh:viable/strict, the range shrinks accordingly.Scope / non-goals
update-viablestrict.ymlor any gate rule; does not touchpytorch/test-infra, HUD, or the nightly torch pin (Use torch 2.15.0 for every CUDA train #25284).Validation
actionlintclean apart from pre-existing info-level shellcheck notes in unchanged script parts; YAML parses; permissions now{contents: read, actions: read}.main, so the new scheduled path is first live after merge; manual-dispatch paths are unchanged code.This PR was authored with an AI coding assistant (Muse Code). Please keep as-is for review; do not land until reviewed.