Repository navigation
ci(python): a failed KTLO leg exits 0 and reports a warning, so main stays green (#1672) - #1679
Conversation
…stays green (#1672) Compat's KTLO legs carried job-level `continue-on-error`, which passes the run but concludes the leg's check run `failure`: `Compat Python 3.7 (KTLO)` turned every commit red. Every job holding a KTLO leg now works one way. * Each step that can fail on a KTLO leg has an `id` and step-level `continue-on-error: ${{ matrix.ktlo == true }}`, checkout included; Compat drops its job-level form. The job concludes `success`. * A step that needs an earlier one's work waits on its `outcome`: Compat and `pypcap-parity` wait on the install as `test` and `integration` do, and each `pypi` step on the one before it, so no KTLO leg builds or tests with the image's `python` after setup-python failed. * A new last step, `KTLO summary`, turns each failed `outcome` into a `::warning` and a job-summary line. A step's own annotations take the job's `ANNOTATION_LEVEL`, `warning` on a KTLO leg; engine-tests' 3.10 cell too. * `pypi`'s checkout and #1634's tag check still block every leg; Release status's KTLO notice stays. * Prose and pins follow; tests/project/test_ktlo_legs_stay_green_1672.py steps through each job leg by leg and runs the scripts. actionlint adds no finding; the touched tests/project modules and tests/test_tier_guard.py pass.
…teps moved (#1672) The first commit grew pypi by 29 lines, so nine citations below it named the wrong line: conda's needs (four times as `:997`), both upload steps and their release tags, and release_status's App-bot notice. * releasing.rst and workflows.rst cite the lines the prose describes: `:1026`, `:933`/`:1283`, `:926-963`/`:1278-1313`, `:1385-1387`. * TestDocCitationsResolve checks create-release.yml citations as it checks unit-tests.yml's, with each range's job, comma lists, and the bare `:N` form these two pages use; BARE_ELSEWHERE names the five bare citations of other files. The new test fails on the first commit's docs (11 failures) and passes here, as do the 1672, 1633, 1634, release-gates and unit-tests-queue modules.
|
Verdict: GOOD TO GO at The change. Every KTLO leg (test, integration, pypcap-parity, Compat, pypi) now masks each step that can fail with step-level What the reviewer checked. It ran its own simulation over 339 scenarios:
Round 2 renumbers the citations and extends Still shown: the runner's own "Process completed with exit code N." annotation stays on a masked step, though the check concludes success ( This conflicts with #1677 in 6 files. Whichever merges second gets rebased. |
|
Coverage: 89.46% (unit tier, Python 3.14,
Per-file detail: the |
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 change — tests cover it;make test(the whole suite) was not run, only the modules named under TestsAdded 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
Why. Job-level
continue-on-error"prevents a workflow run from failing when a job fails"; the job itself still fails. On 4673cff, Compat's run 38453562652 succeeded, but check run 115490362417 (Compat Python 3.7 (KTLO)) concludedfailure. It was the commit's only failing check, andstatusCheckRollupreadFAILURE.How. Every job with a KTLO leg now uses the step-level form, which "prevents a job from failing when a step fails". Each step that can fail, checkout included, gets an
idandcontinue-on-error: ${{ matrix.ktlo == true }}. Its "outcomeisfailure, but the finalconclusionissuccess". A new last step,KTLO summary, turns each failedoutcomeintoJSON(steps)into one::warningand one job-summary line. It runs jq, which is on every Ubuntu runner image. A step's own annotations takeANNOTATION_LEVEL, which iswarningon a KTLO leg; engine-tests' 3.10 cell does the same. Compat andpypcap-paritynow wait on the install'soutcomeastestdoes, and eachpypistep waits on the one before it. On a supported leg these gates add nothing to the defaultsuccess().Unchanged.
pypi's checkout and #1634's tag check still block every leg. Release status's KTLO notice still fires. A failed KTLOrun:step still gets the runner's ownProcess completed with exit code N.error (ScriptHandler.cs:354at 5f0b3ddcc). The runner records it beforeExecutionContext.cs:1442-1446appliescontinue-on-error. Check run 115490411891 shows it, and that check concludedsuccess.Tests.
test_ktlo_legs_stay_green_1672.pyfails each step of each job, on every leg, and checks three things. (a) No KTLO job fails. (b) KTLO legs write only warnings; the summary and cell scripts are executed. (c) Supported legs still fail with::error. All 10 tests fail on origin/main and pass here, under plain unittest, and each of 10 single-line mutations is caught. The #1633 module now pins the warning text and retires the "red" phrasings.TestDocCitationsResolvenow checkscreate-release.ymlcitations too, bare:Nones included; it fails on round 1's docs, which left nine citations, four of them:997, on lines that had moved. actionlint 1.7.12 adds no finding, and the touchedtests/projectmodules andtests/test_tier_guard.pypass.Closes #1672