Skip to content

ci(conda): add a publish input to Conda Update's manual run (#2060) - #2150

Merged
JarryShaw merged 1 commit into
mainfrom
feat/2060-conda-publish-dispatch
Oct 24, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
feat/2060-conda-publish-dispatch

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • ci — workflows or build tooling

Description

Part of #2060, per the owner's ruling there (option 1). A manual Conda Update run is build-only, and scheduled runs upload only after util/conda_vendor.py regenerates a different recipe. So 1.5.0b14's missing win-64 and osx-64 files cannot reach Anaconda (#2140).

  • publish input. workflow_dispatch takes a boolean publish (default false). A new mode job ("Conda run mode") is the only reader. Its publishes output is true on a schedule, on a push workflow_run, and on a publish dispatch of main. Any other ref is refused with ::error.
  • The guards read publishes. Every former github.event_name != 'workflow_dispatch' guard now reads it: push, tag, upload, release steps, both environments, the repository-maintenance group and discussion. If mode is skipped or fails, the output is unset and nothing publishes.
  • Forced bump. "Decide whether to bump" sets bump=true on a publish dispatch even when Verify Changed files saw nothing. Bump Version, Commit Changes and Push Changes then run unchanged. CONDA_CHANGED (Push Changes' pushed) unlocks conda-tag and every conda-dist leg.
  • A forced bump that is not pushed warns. If main moves, or the build is already on main, Push Changes emits a ::warning saying nothing was published and to re-dispatch with publish. The run report goes to status=warning. Unforced notices are byte-identical.
  • Build-only dispatch unchanged, apart from one extra ~5 s mode job.
  • Tests. New tests/project/test_conda_publish_dispatch_2060.py, plus pins updated in eight workflow-reading tests. The 22 cron-conda.yml-reading files plus the tier guard: 709 passed. Against origin/main's workflow they give 54 failed (the new file alone: 37 of 44; the round-2 tests fail 10 against 4b14236cf). Docs-reading tests: 492 passed. actionlint 1.7.12 on cron-conda.yml: clean.

@JarryShaw JarryShaw added the ci Pull requests that change CI or workflow configuration (ci: subject prefix) label Oct 24, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 24, 2026
@JarryShaw JarryShaw added the review: running A cross-review is in flight against the current head - no verdict yet label Oct 24, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 4b14236cf (Sonnet review). A small follow-up amend is coming.

  • A plain dispatch still never pushes, tags, uploads, posts or enters an environment. Every such guard reads needs.mode.outputs.publishes == 'true', and the != 'true' branches are reachable only after mode succeeds with publishes=false.
  • A publish dispatch on main reaches the forced bump, Push Changes, CONDA_CHANGED, conda-tag, all three upload steps, the release steps and discussion. Any other ref fails at mode, so nothing downstream runs.
  • Schedule and push workflow_run are unchanged. A PR-triggered workflow_run still skips. head is identical across the three callers. inputs.publish goes through env:.
  • Tests: 497 passed. The new file fails 39 of 46 against origin/main. actionlint is clean.
  • Being fixed in the amend: when main moves under a publish run, Push Changes' "left to the next Conda Update" notice is wrong, because the next run won't force a bump. The amend makes it a warning to re-dispatch, and words the docs' "build-only" line as the default.

A manual run is build-only, so a version missing platform files on
Anaconda (1.5.0b14's win-64 and osx-64) had no way to get them there
when no dependency moved.

- Add a `publish` boolean input, false by default, to workflow_dispatch.
- Add a `mode` job, the only reader of the input: its `publishes` output
  is 'true' on the schedule, a workflow_run and a manual run with publish
  on main, 'false' on any other manual run; publish off main fails it.
- Every push/tag/upload/post step and every environment now reads
  `publishes`; conda-update joins repository-maintenance when it is 'true'.
- Add "Decide whether to bump", which forces Bump Version, Commit Changes
  and Push Changes on a publishing manual run although nothing changed.
- Update the workflow comments, workflows.rst and releasing.rst, the pins
  this moves, and add test_conda_publish_dispatch_2060.py.
@JarryShaw
JarryShaw force-pushed the feat/2060-conda-publish-dispatch branch from 4b14236 to 6f5747a Compare October 24, 2026 22:29
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 6f5747a0b (Sonnet re-review of the round-2 amend).

  • With publish off, the three Push Changes notices are byte-identical to before. The new ::warning branches fire only when forced is true, which only a publish dispatch sets.
  • forced is written on every path of "Decide whether to bump". If that step never ran, the value is empty and the old behaviour applies.
  • The report's new status=warning cannot fire on a forced bump that did publish, since COMMIT is set beside pushed=true. Status is unchanged for every other event.
  • The "Build already on main" remedy is accurate: another publishing run pushed N+1, so dispatch again only if that run's upload failed.
  • Tests: 209 passed. The new file fails 10 of 38 on 4b14236cf. actionlint is clean.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, 6f5747a0b, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 880 2618 866 92.12%
pcapkit/corekit 2589 75 816 37 96.48%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2971 23 1036 25 98.80%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17418 219 4574 185 98.14%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 504 7 146 5 98.15%
pcapkit/vendor 4432 1988 1018 167 51.87%

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

@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 6f5747a0b.

@JarryShaw
JarryShaw merged commit 8670fa2 into main Oct 24, 2026
62 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 24, 2026
@JarryShaw
JarryShaw deleted the feat/2060-conda-publish-dispatch branch October 24, 2026 23:11
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 24, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 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)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant