Skip to content

fix: restrict PyPI publishing to core-bound versions only#9949

Closed
christian-byrne wants to merge 1 commit intoComfy-Org:mainfrom
christian-byrne:pypi-defer-publish
Closed

fix: restrict PyPI publishing to core-bound versions only#9949
christian-byrne wants to merge 1 commit intoComfy-Org:mainfrom
christian-byrne:pypi-defer-publish

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Mar 15, 2026

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

  • What: Remove publish_pypi job from release-draft-create.yaml (was publishing on every release PR merge). Add wait-for-release and publish-pypi jobs to release-biweekly-comfyui.yaml so PyPI packages are only built and published for core-bound versions. The create-comfyui-pr job now depends on successful PyPI publish.
  • release-draft-create.yaml: Deleted publish_pypi job, removed it from comment_release_summary needs. GitHub releases and npm types still publish for all versions.
  • release-biweekly-comfyui.yaml: Added wait-for-release (polls up to 30 min for tag when a new release was triggered) and publish-pypi (self-contained: checks out tag, builds frontend, builds+publishes PyPI package).

Review Focus

  • The wait-for-release job 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 via workflow_dispatch.
  • create-comfyui-pr now requires publish-pypi success, 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

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
@christian-byrne christian-byrne requested a review from a team as a code owner March 15, 2026 07:11
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 15, 2026
@github-actions
Copy link

🎨 Storybook: loading Building...

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

📝 Walkthrough

Walkthrough

These 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

Cohort / File(s) Summary
Release Biweekly ComfyUI Workflow
.github/workflows/release-biweekly-comfyui.yaml
Adds new wait-for-release job with polling logic; inserts wait-for-release step into publish-pypi job; restructures create-comfyui-pr job to depend on publish-pypi instead of trigger-release-if-needed; establishes linear dependency chain: resolve-version → publish-pypi → create-pr with explicit tag propagation handling.
Release Draft Create Workflow
.github/workflows/release-draft-create.yaml
Removes publish_pypi job entirely and eliminates its references from draft_release and comment_release_summary job dependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Through workflows we hop, dependency by dependency,
Where tags are awaited with patient frequency,
New polls and new sequences, all in a line,
Release management logic: perfectly fine! ✨🔄

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ⚠️ Warning PR uses bug-fix language ('fix:') but does not modify browser_tests/ files nor explain why E2E tests weren't added. Add/update Playwright test under browser_tests/ or explain in PR description why E2E regression test is not applicable for workflow changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the changeset: restricting PyPI publishing to only core-bound biweekly versions instead of daily releases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description covers all key sections: Summary clearly states the purpose, Changes detail what was modified across files with specific implementation details, and Review Focus highlights critical design decisions including timeout behavior and dependency changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 15, 2026

🎭 Playwright: ✅ 562 passed, 0 failed · 4 flaky

📊 Browser Reports
  • chromium: View Report (✅ 549 / ❌ 0 / ⚠️ 4 / ⏭️ 10)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 10 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 21069d5 and 8deda12.

📒 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

Comment on lines +199 to +204
- 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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

"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.

Suggested change
- 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.

@christian-byrne
Copy link
Contributor Author

Closing in favor of #9948 which has additional improvements (skip-existing, PyPI propagation check, PR body update on re-run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant