Repository navigation
fix(ci): Conda Update keeps the release's name and notes when it uploads (#1657) - #1678
Conversation
…ads (#1657) conda-dist attaches each bump's packages with ncipollo/release-action@v1.21.0 and allowUpdates: true, which calls Update a release first. That call sends name, body, prerelease and draft whether or not the step sets them, and unset they are the tag, "" and false, so every bump wiped the release's name and notes. - The step sets omitBodyDuringUpdate, omitDraftDuringUpdate, omitNameDuringUpdate and omitPrereleaseDuringUpdate, which leave those fields out of the update. - releasing.rst says so, and that a draft would be retargeted at commit rather than published. - tests/project/test_conda_dist_keeps_release_notes_1657.py pins the four inputs and the step's whole input set; it fails on origin/main's cron-conda.yml with failures=6.
…skip (#1657) With omitDraftDuringUpdate set, the upload no longer publishes a draft; it still finds it by tag and updates it with target_commitish: commit (ncipollo/release-action v1.21.0 src/Action.ts:85-92,107-120), so the draft stays a draft but is retargeted at main, which a re-run of Create Release would reuse. The skip is unchanged; only its stated reason was stale. - cron-conda.yml: the check's comment and its draft ::notice say the upload would retarget the draft at main, not publish it. "tagging main's tip" moves into the missing-release reason, whose notice is byte-identical. - releasing.rst says the same. - test_release_tags_the_run_sha_1634.py: the docstring, message and notice pins follow; the draft pin fails on the previous text, and the missing-release pin now covers its whole sentence.
…ease resets its target (#1657) The previous commit said a re-run of Create Release would reuse a draft retargeted at main, target and all. softprops/action-gh-release v3.0.2 finds drafts (src/github.ts:832-866) and, given a non-empty target_commitish that differs, overwrites the target (:636-646); create-release.yml passes github.sha on workflow_run, so that run resets the draft's target to its own sha. - cron-conda.yml: the release check's comment gives tagging main's tip to the missing-release path only, and calls skipping a draft a precaution against retargeting a release Create Release owns. - releasing.rst and the TestCondaUpdateNeverMakesTheRelease docstring say the same; "either path would tag" is gone. The ::notice strings are unchanged, so no pin moves. The release, gates, #1657, unit-tests queue, doc-claims, workflow_run and #1633 tests pass.
|
Verdict: GOOD TO GO at The fix. Rounds 2 and 3. The release check's reasons now match the pinned sources. A missing release would be created, and tagged, at No notes or assets are restored; that is still your call on #1657. |
|
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) — not run: all three lintpcapkit, and nopcapkit/file changed; the new test isisort -l100cleanmake testpasses, and a test case covers the change — ran the affected test files, not the whole suiteAdded 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. At v1.21.0,
conda-dist'sallowUpdates: truecalls Update a release before it uploads (src/Action.ts:107-120). That call sendsname,body,prereleaseanddraft(src/Releases.ts:162-174). Unset, those are the tag (src/Inputs.ts:128-135),""(:70-82) andfalse(:84-92,:210-240). The issue's:103-118iscreatedReleaseNameandcommit; the tag fallback is:128-135.Fix. The step now sets the four
omit*DuringUpdateinputs. Each one makes its getter returnundefined(:210-252). Octokit deletes undefined keys before sending (dist/index.js:38369-38388), and Update a release requires no body parameter (REST docs).omitBodyDuringUpdatealso stops generated notes on update (src/Action.ts:192-194).releasing.rstis updated to match.Other inputs. An empty
discussionCategorybecomesundefined(Inputs.ts:120-126), so it is dropped.makeLatestis never empty: its default,legacy(action.yml:58-61), is sent on every update (job 107491856892 logsmakeLatest: legacy), and the action has no omit input for it. I left it alone.Evidence. 33 of the 37 releases with bump (
_N, N ≥ 1) conda assets have a name equal to their tag and a 0-character body,v1.5.0a1,v1.4.1.post2,v1.4.1andv1.3.5.post42among them.v1.5.0b4's bump upload succeeded on 2026-09-24, yet it now has its name and 2,487 characters of notes, and itsupdated_atis 2026-09-29.v1.5.0a1still readsprerelease: true. So the prerelease reset comes from reading the source; I did not observe it.Tests. The new
test_conda_dist_keeps_release_notes_1657.pypins the four inputs and the step's exact input set, checked against both #1634's scanner andyaml.safe_load. With unittest it reportsRan 4 tests … OK. Withorigin/main'scron-conda.ymlswapped in it reportsFAILED (failures=6). The other tests that read these files also pass (#1634, release gates, unit-tests queue, doc claims, workflow and #1633 tests).Second commit. Once a draft stays a draft, the release check's reason for skipping one is stale. Its comment and
::noticenow say the upload would retarget the draft atmain(src/Action.ts:85-92,:107-120) rather than publish it, andreleasing.rstandtest_release_tags_the_run_sha_1634.pysay the same. The skip itself is unchanged. The updated draft pin fails on the previous text (1 failed, 65 passed).Third commit. The second said a re-run of Create Release would reuse the retargeted draft, target and all. It would not:
action-gh-release3.0.2 finds drafts (src/github.ts:832-866) and overwrites a differing non-emptytarget_commitish(:636-646), whichcreate-release.ymlsets togithub.shaonworkflow_run. The comment,releasing.rstand the #1634 docstring now give taggingmain's tip to the missing-release path only, and call skipping a draft a precaution. Wording only; the notices and their pins are unchanged.Not done. No notes or assets are restored.
Closes #1657