Repository navigation
Conversation
|
Verdict: GOOD TO GO at |
|
Coverage: 89.66% (unit tier, Python 3.14,
Per-file detail: the |
|
Not ready yet: the Python 3.10 leg is red. The failure is in the new test's teardown, not in its body. |
…1643) Conda Update, Vendor Update and GitHub Pages check out github.sha, main's tip when the workflow_run is raised, not the commit the completed Unit Tests run verified. In a merge wave an older commit's success authorised work on an untested tip: Conda Update 38325136710 bumped 2e941bb under 9083163's verdict. - Add a `verdict` job to each, running util/verdict_covers_checkout.py. It accepts the tip when it is the verified commit, or that commit plus github-actions[bot] commits to conda/build and conda/requirements.txt only. The acting job's workflow_run clause now also needs `verified == 'true'`. - Key the workflow-level concurrency group on the verdict's sha for a workflow_run, so a stale run that skips cannot cancel a pending run whose verdict matches. Other events keep their groups. - workflows.rst: describe the check and what it leaves uncovered, and renumber the three `uses:` citations. tests/project/test_workflow_run_verdict.py: 25 pass. With origin/main's three workflows swapped in, 9 fail (failures=22, subtests counted); with the verdict checkout at fetch-depth 1, 1 fails in all three workflows. A merge whose side branch runs past the shallow checkout is refused with exit 0, not a crash. Its throwaway repos run no git maintenance: since git 2.54 a commit's detached auto repack raced their cleanup ("Directory not empty", git 2.55.0). Closes #1643
9d4aaca to
c2ee06a
Compare
|
Verdict: GOOD TO GO at The fix turns off |
|
Resolve conflicts |
|
Resolved by closing: this change is already on |
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeAdded a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Cause. A
workflow_runchecks outgithub.sha, "Last commit on default branch" (GitHub, Events that trigger workflows), notgithub.event.workflow_run.head_sha. Conda Update 38325136710 bumped 2e941bb under 9083163's verdict.Fix. Each workflow gets a
verdictjob (cron-conda.yml:61,cron-vendor.yml:67,deploy-pages.yml:66) runningdecide(util/verdict_covers_checkout.py:77), and the acting job'sworkflow_runclause also needsverified == 'true'(cron-conda.yml:112,cron-vendor.yml:116,deploy-pages.yml:115). A stale verdict skips cleanly; schedule runs, Pages' pull-request builds and PR-raised runs run the same jobs as before. Forworkflow_runthe workflow-level group is keyed on the verdict's sha (cron-conda.yml:37,cron-vendor.yml:43,deploy-pages.yml:41), as GitHub cancels "any existingpendingjob or workflow in the same concurrency group".Bot commits. A tip passes on top of its verdict only if every commit after it is by
github-actions[bot]and touches onlyconda/buildandconda/requirements.txt(util/verdict_covers_checkout.py:58), which is all the 137 conda bumps and 9 build resets onmaintouch. Vendor bumps rewritepcapkit/: e58618b's run 36355214959 failed 6 jobs (each Python leg "12 failed", plus the aggregator) where its parent's run 36354135989 failed none, so they wait for their own run. That run exists: since #401 (bb90090, 2026-09-15) bots push with a deploy key, and all 17 bot commits since have apushrun of Unit Tests; 5d5d8af, 48bc113 and e4d0823, from before it, have none (GITHUB_TOKENevents "will not create a new workflow run"). This needs the verdict checkout'sfetch-depthat 2 or more; it is 20 (cron-conda.yml:80,cron-vendor.yml:86,deploy-pages.yml:85).Not covered. The verdict covers the checkout only. Push Changes
git pull --rebases onto the live tip (cron-conda.yml:197) and Conda Taggit pulls and tagsHEAD(:253-254), so a human commit landing after the event can be tagged, and once #1641 lets Conda Tag and Conda deployment run, packaged unverified. #1641 is being reworked to close this before it lands: Conda Tag will tag the sha Push Changes pushed, and Push Changes will refuse a rebase that brought in non-bot commits. A stale Vendor Update run also still concludessuccess, so Create Release triggers on it as before:create-release.yml:179is its only conclusion check, and its own Release test gate (:362) is what protects it.Tests. New
tests/project/test_workflow_run_verdict.py, 25 tests: 15 run the script in throwaway repos rebuilt from the 2026-10-13 wave, 9 evaluate the three workflows, and 1 pins that those repos run no git maintenance. Their.gitconfigsetsmaintenance.auto=false,gc.auto=0and bothautoDetach=false(:100-103). Since git 2.54 a commit's detached auto maintenance repacks onceobjects/17holds two loose objects, and on the runner's git 2.55.0 that repack racedTemporaryDirectorycleanup in run 38349290407 ("Directory not empty: 'objects'", Python 3.10). On a local git 2.55.0 build,test_a_merge_on_top_is_refusedfailed that way in 302 of 800 runs (8 in parallel) before the change and 0 of 800 after. With origin/main's workflows swapped in, all 9 fail (unittestfailures=22); atfetch-depth: 1,test_the_verdict_checkout_reaches_past_a_bot_commitfails in all three. A merge whose side branch runs past the depth-20 checkout (e23817b brought in 76 commits) leaves a parentless boundary commit; it is refused with exit 0 (util/verdict_covers_checkout.py:92-93), andtest_a_merge_deeper_than_the_checkout_is_refused_not_failedfails withValueErrorunder a barestrip().make testis not claimed: the whole suite was not run, only 14 test files, one at a time, all passing.With #1641. The two PRs merge without conflicts, but 4 of #1641's
TestCondaBumpIsTaggedAndUploadedtests then fail, because itscron-conda.ymlmodel has noverdictjob. Land this one first: #1641 is being rebased onto it and carries the reconcile, which bringstest_release_gatesto 103 passed on the merged tree.Closes #1643