fix: restrict PyPI publishing to core-bound versions only#9949
fix: restrict PyPI publishing to core-bound versions only#9949christian-byrne wants to merge 1 commit intoComfy-Org:mainfrom
Conversation
Remove publish_pypi job from release-draft-create.yaml so daily nightly releases no longer publish to PyPI. Add wait-for-release and publish-pypi jobs to release-biweekly-comfyui.yaml so PyPI packages are only published for biweekly core-bound versions (~26/year instead of ~365/year). The biweekly workflow now: 1. Waits for the release tag if a new release was triggered 2. Checks out the tagged commit, builds the frontend, and publishes to PyPI 3. Only creates the ComfyUI PR after PyPI publish succeeds Fixes COM-16164, COM-16778
📝 WalkthroughWalkthroughThese changes restructure GitHub workflow orchestration by introducing a new tag-polling mechanism in the biweekly release workflow, establishing sequential dependencies between job stages, and removing the PyPI publishing job from the draft release workflow entirely. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
🎭 Playwright: ✅ 562 passed, 0 failed · 4 flaky📊 Browser Reports
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release-biweekly-comfyui.yaml:
- Around line 199-204: Update the "Tag already exists" step to actually verify
the remote tag before assuming it exists: when
needs.trigger-release-if-needed.result == 'skipped', run a check using
TARGET_VERSION (env TARGET_VERSION) against the remote (e.g., git ls-remote or
git fetch + git rev-parse refs/tags/v${TARGET_VERSION}) and exit non‑zero with a
clear error if the tag is missing so downstream jobs like publish-pypi fail fast
with a descriptive message.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 17fc6ecb-50a0-4534-a9f7-db7a94be9323
📒 Files selected for processing (2)
.github/workflows/release-biweekly-comfyui.yaml.github/workflows/release-draft-create.yaml
💤 Files with no reviewable changes (1)
- .github/workflows/release-draft-create.yaml
| - name: Tag already exists | ||
| if: needs.trigger-release-if-needed.result == 'skipped' | ||
| env: | ||
| TARGET_VERSION: ${{ needs.resolve-version.outputs.target_version }} | ||
| run: | | ||
| echo "✅ No new release needed — tag v${TARGET_VERSION} should already exist" |
There was a problem hiding this comment.
"Tag already exists" step doesn't verify the tag actually exists.
When trigger-release-if-needed is skipped, this step assumes the tag exists but doesn't verify it. If needs_release is false for a reason other than the tag existing (e.g., no changes detected), the subsequent publish-pypi job will fail at checkout.
Consider adding verification to fail fast with a clear error rather than failing later at checkout.
🛡️ Proposed fix: verify tag existence
- name: Tag already exists
if: needs.trigger-release-if-needed.result == 'skipped'
env:
+ GH_TOKEN: ${{ secrets.PR_GH_TOKEN }}
TARGET_VERSION: ${{ needs.resolve-version.outputs.target_version }}
run: |
- echo "✅ No new release needed — tag v${TARGET_VERSION} should already exist"
+ TAG="v${TARGET_VERSION}"
+ if gh api "repos/Comfy-Org/ComfyUI_frontend/git/refs/tags/${TAG}" > /dev/null 2>&1; then
+ echo "✅ Tag ${TAG} already exists"
+ else
+ echo "❌ Tag ${TAG} does not exist but needs_release is false"
+ echo "This may indicate the resolver returned unexpected results."
+ exit 1
+ fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Tag already exists | |
| if: needs.trigger-release-if-needed.result == 'skipped' | |
| env: | |
| TARGET_VERSION: ${{ needs.resolve-version.outputs.target_version }} | |
| run: | | |
| echo "✅ No new release needed — tag v${TARGET_VERSION} should already exist" | |
| - name: Tag already exists | |
| if: needs.trigger-release-if-needed.result == 'skipped' | |
| env: | |
| GH_TOKEN: ${{ secrets.PR_GH_TOKEN }} | |
| TARGET_VERSION: ${{ needs.resolve-version.outputs.target_version }} | |
| run: | | |
| TAG="v${TARGET_VERSION}" | |
| if gh api "repos/Comfy-Org/ComfyUI_frontend/git/refs/tags/${TAG}" > /dev/null 2>&1; then | |
| echo "✅ Tag ${TAG} already exists" | |
| else | |
| echo "❌ Tag ${TAG} does not exist but needs_release is false" | |
| echo "This may indicate the resolver returned unexpected results." | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release-biweekly-comfyui.yaml around lines 199 - 204,
Update the "Tag already exists" step to actually verify the remote tag before
assuming it exists: when needs.trigger-release-if-needed.result == 'skipped',
run a check using TARGET_VERSION (env TARGET_VERSION) against the remote (e.g.,
git ls-remote or git fetch + git rev-parse refs/tags/v${TARGET_VERSION}) and
exit non‑zero with a clear error if the tag is missing so downstream jobs like
publish-pypi fail fast with a descriptive message.
|
Closing in favor of #9948 which has additional improvements (skip-existing, PyPI propagation check, PR body update on re-run). |

Summary
Restrict PyPI publishing to biweekly core-bound versions only (~26/year), eliminating daily nightly publishes (~365/year) that caused PyPI storage limit failures (versions 1.41.12, 1.41.13 failed).
Changes
publish_pypijob fromrelease-draft-create.yaml(was publishing on every release PR merge). Addwait-for-releaseandpublish-pypijobs torelease-biweekly-comfyui.yamlso PyPI packages are only built and published for core-bound versions. Thecreate-comfyui-prjob now depends on successful PyPI publish.release-draft-create.yaml: Deletedpublish_pypijob, removed it fromcomment_release_summaryneeds. GitHub releases and npm types still publish for all versions.release-biweekly-comfyui.yaml: Addedwait-for-release(polls up to 30 min for tag when a new release was triggered) andpublish-pypi(self-contained: checks out tag, builds frontend, builds+publishes PyPI package).Review Focus
wait-for-releasejob polls for the tag with 60 attempts × 30s = 30 min timeout. If the release PR is not merged in time, the workflow fails and can be re-triggered viaworkflow_dispatch.create-comfyui-prnow requirespublish-pypisuccess, ensuring the PyPI URL in the PR body is valid.release-pypi-dev.yaml(manual dev publishes) is unchanged.┆Issue is synchronized with this Notion page by Unito