Skip to content

fix(ci): Conda Update keeps the release's name and notes when it uploads (#1657) - #1678

Merged
JarryShaw merged 3 commits into
mainfrom
fix/1657-conda-dist-keeps-release-notes
Oct 13, 2026
Merged

JarryShaw merged 3 commits into
mainfrom
fix/1657-conda-dist-keeps-release-notes

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into 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 lint pcapkit, and no pcapkit/ file changed; the new test is isort -l100 clean

  • make test passes, and a test case covers the change — ran the affected test files, not the whole suite

  • Added a changelog entry under docs/source/changelog/ and regenerated CHANGELOG.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) #657

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description of your pull request and other information

Cause. At v1.21.0, conda-dist's allowUpdates: true calls Update a release before it uploads (src/Action.ts:107-120). That call sends name, body, prerelease and draft (src/Releases.ts:162-174). Unset, those are the tag (src/Inputs.ts:128-135), "" (:70-82) and false (:84-92, :210-240). The issue's :103-118 is createdReleaseName and commit; the tag fallback is :128-135.

Fix. The step now sets the four omit*DuringUpdate inputs. Each one makes its getter return undefined (:210-252). Octokit deletes undefined keys before sending (dist/index.js:38369-38388), and Update a release requires no body parameter (REST docs). omitBodyDuringUpdate also stops generated notes on update (src/Action.ts:192-194). releasing.rst is updated to match.

Other inputs. An empty discussionCategory becomes undefined (Inputs.ts:120-126), so it is dropped. makeLatest is never empty: its default, legacy (action.yml:58-61), is sent on every update (job 107491856892 logs makeLatest: 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.1 and v1.3.5.post42 among 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 its updated_at is 2026-09-29. v1.5.0a1 still reads prerelease: 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.py pins the four inputs and the step's exact input set, checked against both #1634's scanner and yaml.safe_load. With unittest it reports Ran 4 tests … OK. With origin/main's cron-conda.yml swapped in it reports FAILED (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 ::notice now say the upload would retarget the draft at main (src/Action.ts:85-92, :107-120) rather than publish it, and releasing.rst and test_release_tags_the_run_sha_1634.py say 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-release 3.0.2 finds drafts (src/github.ts:832-866) and overwrites a differing non-empty target_commitish (:636-646), which create-release.yml sets to github.sha on workflow_run. The comment, releasing.rst and the #1634 docstring now give tagging main'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

…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.
@JarryShaw JarryShaw added fix Pull requests that fix a defect (fix: subject prefix) ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 13, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at edcf34396. This took three Sonnet-reviewed rounds; rounds 2 and 3 corrected wording only. I re-ran the 1657, 1634 and release-gate tests: 4, 66 and 120 passed.

The fix. conda-dist's ncipollo/release-action@v1.21.0 step now sets omitBodyDuringUpdate, omitDraftDuringUpdate, omitNameDuringUpdate and omitPrereleaseDuringUpdate. An upload therefore leaves the release's name, notes, prerelease flag and draft state alone (src/Inputs.ts:210-252). Live data shows the damage this stops: 33 of the 37 releases with bump assets have their name reset to the tag and an empty body.

Rounds 2 and 3. The release check's reasons now match the pinned sources. A missing release would be created, and tagged, at main's tip. A draft would be retargeted at commit; Create Release's workflow_run then resets it to its own sha (softprops v3.0.2 src/github.ts:636-646). So skipping a draft is a precaution only.

No notes or assets are restored; that is still your call on #1657.

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 89.46% (unit tier, Python 3.14, edcf34396, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 3 20 3 95.16%
pcapkit/const 18858 954 2366 868 91.06%
pcapkit/corekit 2366 67 760 35 96.48%
pcapkit/dumpkit 275 3 100 3 98.40%
pcapkit/foundation 3031 152 1074 35 94.23%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17166 226 4580 190 98.07%
pcapkit/toolkit 1350 275 558 6 77.20%
pcapkit/utilities 494 4 146 4 98.75%
pcapkit/vendor 4409 2342 1006 157 43.25%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 68a57a9 into main Oct 13, 2026
52 of 53 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 13, 2026
@JarryShaw
JarryShaw deleted the fix/1657-conda-dist-keeps-release-notes branch October 13, 2026 21:01
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix) fix Pull requests that fix a defect (fix: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(ci): Conda Update's GitHub upload wipes the release's name and notes

1 participant