-
Notifications
You must be signed in to change notification settings - Fork 419
[feat] Add weekly ComfyUI release automation #6877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds scheduled workflow to bump ComfyUI frontend RC releases every Monday at noon PST. - Resolver script checks ComfyUI requirements.txt and determines next minor version - Triggers release workflow if commits exist since last patch tag - Creates draft PR to comfyanonymous/ComfyUI with updated requirements.txt - Reuses existing release-version-bump workflow and comment actions - Includes error handling and validation for all steps
📝 WalkthroughWalkthroughAdds a weekly (and manually triggerable) GitHub Actions workflow that resolves ComfyUI frontend release metadata, conditionally dispatches the frontend release workflow, and creates/updates a draft PR on a configured fork to bump Changes
Sequence DiagramsequenceDiagram
autonumber
participant Scheduler as Scheduler / Manual
participant Workflow as weekly-comfyui-release (GH Actions)
participant Resolver as resolve-comfyui-release.ts
participant Frontend as comfyui-frontend repo
participant ReleaseWf as release-version-bump (frontend)
participant Fork as comfyui fork repo
participant Upstream as comfyui upstream
Scheduler->>Workflow: trigger (schedule/manual)
Workflow->>Resolver: checkout repos & run resolver
Resolver->>Frontend: query tags, branches, commits
Frontend-->>Resolver: tags / branch heads / SHAs
Resolver-->>Workflow: emit ReleaseInfo JSON
alt needs_release == true
Workflow->>ReleaseWf: dispatch release workflow with target_version
ReleaseWf-->>Workflow: dispatch confirmation
end
Workflow->>Fork: update `requirements.txt`, commit branch
Fork-->>Workflow: push branch (forced/weekly)
Workflow->>Upstream: create or update draft PR (fork -> upstream)
Upstream-->>Workflow: PR URL / status
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-11-24T19:48:23.088ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (3)
Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 11/26/2025, 11:52:52 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 11/27/2025, 12:01:38 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.18 MB (baseline 3.18 MB) • ⚪ 0 BMain entry bundles and manifests
Graph Workspace — 945 kB (baseline 945 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
UI Components — 138 kB (baseline 138 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.84 MB (baseline 3.84 MB) • ⚪ 0 BBundles that do not match a named category
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
.github/workflows/weekly-comfyui-release.yaml (2)
224-240: Force-push strategy overwrites branch history weekly.The workflow uses
git push -fto overwrite the branch each week. This is intentional per the PR description ("force-pushes the same branch weekly to maintain a single open PR"), but be aware this destroys the branch history.If the PR has review comments or commits from maintainers, they will be lost. Consider documenting this behavior in a comment.
Add a comment to clarify the intent:
# Force push to fork (overwrites previous week's branch) + # Note: This intentionally destroys branch history to maintain a single PR + # Any review comments or changes will need to be re-applied if ! git push -f origin "$BRANCH"; then
245-261: PR existence check has a logic issue.The PR creation logic attempts to create a PR, and if it fails, checks if a PR already exists. However, line 255 checks for PR existence but doesn't capture the output, then the condition always evaluates to true based on the command's exit code.
The logic works but could be clearer. Consider simplifying:
# Try to create PR, ignore error if it already exists if ! gh pr create \ --repo comfyanonymous/ComfyUI \ --head "${FORK_OWNER}:${BRANCH}" \ --base master \ --title "Bump comfyui-frontend-package to ${{ needs.resolve-version.outputs.target_version }}" \ --body "$PR_BODY" \ --draft 2>&1; then # Check if PR already exists - if gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' > /dev/null 2>&1; then + EXISTING_PR=$(gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' 2>/dev/null || echo "") + if [ -n "$EXISTING_PR" ]; then echo "PR already exists, updating branch will update the PR" else echo "Failed to create PR and no existing PR found" exit 1 fi fiscripts/cicd/resolve-comfyui-release.ts (2)
19-32: Silent error handling may mask critical failures.The
execfunction catches all errors and returns an empty string, which silently suppresses failures. While this works for optional operations (like checking if a tag exists), it could hide critical errors for required operations (like fetching from git repos).Consider logging errors to stderr before returning empty string, or accepting a parameter to control error behavior:
function exec(command: string, cwd?: string): string { try { return execSync(command, { cwd, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim() } catch (error) { + console.error(`Command failed: ${command}`) + if (error instanceof Error) { + console.error(error.message) + } return '' } }
59-89: Consider using git's native version sorting.The manual semantic sort implementation is correct, but git has built-in version sorting that's more robust and handles edge cases like pre-release versions.
function getLatestPatchTag(repoPath: string, minor: number): string | null { // Fetch all tags exec('git fetch --tags', repoPath) - // List all tags matching v1.{minor}.* - const tags = exec(`git tag -l 'v1.${minor}.*'`, repoPath) - .split('\n') - .filter((tag) => tag.trim() !== '') - - if (tags.length === 0) { + // Get the latest tag matching v1.{minor}.* using git's version sort + const latestTag = exec( + `git tag -l 'v1.${minor}.*' --sort=-version:refname | head -n 1`, + repoPath + ) + + if (!latestTag) { return null } - // Sort tags by version (semantic sort) - const sortedTags = tags.sort((a, b) => { - const aParts = a.replace('v', '').split('.').map(Number) - const bParts = b.replace('v', '').split('.').map(Number) - - for (let i = 0; i < 3; i++) { - if (aParts[i] !== bParts[i]) { - return aParts[i] - bParts[i] - } - } - return 0 - }) - - return sortedTags[sortedTags.length - 1] + return latestTag }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/weekly-comfyui-release.yaml(1 hunks)knip.config.ts(1 hunks)scripts/cicd/resolve-comfyui-release.ts(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/weekly-comfyui-release.yaml
2-2: unexpected key "description" for "workflow" section. expected one of "concurrency", "defaults", "env", "jobs", "name", "on", "permissions", "run-name"
(syntax-check)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: setup
- GitHub Check: test
- GitHub Check: collect
- GitHub Check: lint-and-format
🔇 Additional comments (4)
knip.config.ts (1)
30-30: LGTM! Necessary addition for the new workflow.The 'gh' binary is used extensively in the new weekly-comfyui-release.yaml workflow, so adding it to ignoreBinaries prevents false positives from Knip.
scripts/cicd/resolve-comfyui-release.ts (3)
1-17: LGTM! Clean interface definition.The ReleaseInfo interface is well-structured with clear field names and appropriate types for all release metadata.
34-57: LGTM! Robust version parsing.The function correctly handles multiple version operators and provides clear error messages. The regex pattern appropriately captures semantic versions.
187-209: LGTM! Clean main execution flow.The argument parsing, error handling, and JSON output are well-implemented. The export at the end allows the function to be used programmatically.
- Validate currentVersion and tagVersion format before destructuring - Check for 3-part versions with numeric parts - Guard parseInt with radix and NaN check - Validate existingPatch is finite number before increment - Return null early on invalid formats with descriptive errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
scripts/cicd/resolve-comfyui-release.ts (1)
230-251: LGTM!The main execution block appropriately validates required arguments and exits with proper error codes. JSON output format is well-suited for GitHub Actions consumption.
Optionally, you could add upfront validation that the paths exist and are git repositories before calling
resolveRelease:if (!fs.existsSync(comfyuiRepoPath) || !fs.existsSync(path.join(comfyuiRepoPath, '.git'))) { console.error(`Invalid ComfyUI repository path: ${comfyuiRepoPath}`) process.exit(1) } if (!fs.existsSync(frontendRepoPath) || !fs.existsSync(path.join(frontendRepoPath, '.git'))) { console.error(`Invalid frontend repository path: ${frontendRepoPath}`) process.exit(1) }This would provide clearer error messages, but it's not essential since the git commands will fail anyway with descriptive errors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/cicd/resolve-comfyui-release.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: lint-and-format
- GitHub Check: test
- GitHub Check: collect
- GitHub Check: setup
🔇 Additional comments (4)
scripts/cicd/resolve-comfyui-release.ts (4)
6-17: LGTM!The
ReleaseInfointerface is well-structured and includes all necessary metadata for tracking release state, version progression, and PR references.
38-57: LGTM!The regex comprehensively handles Python requirements operators, and the error handling with null returns is appropriate for the calling context.
62-76: LGTM!The validation is thorough, and the
String(num) === partcheck at line 74 cleverly prevents edge cases like leading zeros ("01") or trailing characters ("3extra").
125-197: LGTM! Version validation concerns from prior reviews have been addressed.The function now validates:
currentVersionformat before destructuring (lines 125-131)tagVersionformat before destructuring (lines 183-189)existingPatchis a valid non-negative number (lines 193-197)commitCountNaN case is handled (line 178)All destructuring operations are now protected by validation checks, preventing the runtime issues flagged in previous reviews.
- Replace -i with -i.bak for BSD/macOS compatibility - Use [0-9.][0-9.]* instead of GNU-specific [0-9.]\+ - Store version in variable for cleaner shell expansion - Remove .bak file after successful replace
- Add regex filter for valid semver tags (vX.Y.Z format) - Prevent NaN from malformed tags like v1.28.x or v1.28 - Return null if no valid tags found after filtering - Log descriptive error showing malformed tags
- Log command, cwd, and error message when exec fails - Preserve existing empty-string fallback behavior - Improve debugging for command execution failures
- Remove sleep + polling for workflow run ID - Use generic links to workflow runs page instead of specific run - Eliminates race condition and timeout complexity - Cleaner job summary with branch and version info
- Install dependencies in frontend directory - Ensures tsx devDependency is available for resolver script - Use --frozen-lockfile for reproducible builds
There was a problem hiding this 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
♻️ Duplicate comments (1)
.github/workflows/weekly-comfyui-release.yaml (1)
1-2: Remove invalid "description" field (duplicate issue).Line 2 contains a "description" field that is not valid at the workflow root level in GitHub Actions. This was flagged in a previous review and is still present.
Apply this diff to remove it:
name: "Weekly ComfyUI Release" -description: "Automated weekly workflow to bump ComfyUI frontend RC releases" on:Alternatively, convert it to a YAML comment to preserve the documentation:
name: "Weekly ComfyUI Release" +# Automated weekly workflow to bump ComfyUI frontend RC releases on:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/weekly-comfyui-release.yaml(1 hunks)scripts/cicd/resolve-comfyui-release.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/cicd/resolve-comfyui-release.ts
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/weekly-comfyui-release.yaml
2-2: unexpected key "description" for "workflow" section. expected one of "concurrency", "defaults", "env", "jobs", "name", "on", "permissions", "run-name"
(syntax-check)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: setup
- GitHub Check: lint-and-format
- GitHub Check: test
- GitHub Check: collect
🔇 Additional comments (5)
.github/workflows/weekly-comfyui-release.yaml (5)
45-57: ✓ Dependency installation properly configured (past issue resolved).The pnpm and Node.js setup, followed by
pnpm install --frozen-lockfile, correctly addresses the previous concern thattsxdevDependency would be unavailable. The correct order and working-directory specification ensure dependencies are installed before the resolver script executes.
154-156: ✓ sed command is POSIX-compatible (past issue resolved).The sed invocation correctly uses
-i.bak(portable across BSD and GNU sed) and the POSIX-compatible regex[0-9.][0-9.]*instead of the GNU-specific\+metacharacter. The backup is properly cleaned up afterward. This resolves the previous cross-platform portability concern.
99-132: ✓ Simplified trigger logic avoids race condition (past concern resolved).The trigger-release-if-needed job uses a straightforward
gh workflow runinvocation without attempting to fetch or track the resulting workflow run ID. This avoids the race condition and misleading output name flagged in the previous review. The summary provides a direct link to workflow runs for visibility.
59-97: ✓ Robust error handling and JSON validation in resolver step.The resolver step includes proper defensive coding:
set -euo pipefailfor fail-fast behavior, JSON validation withjq empty, and explicit error messages. All required outputs are correctly parsed and populated. The step summary provides helpful debugging information with the diff URL and version details.
208-231: ✓ Git operations properly configured for weekly branch reuse.The git configuration, branch creation with reuse (
git checkout -B), and conditional commit logic are appropriate. The force push correctly maintains a single updated branch weekly, and the commit guard prevents empty commits on subsequent runs with no changes.
- Move description to YAML comment - GitHub Actions does not support top-level description field
- Add comment documenting force-push destroys history - Improve PR existence check to capture PR number - Use git native version sorting instead of manual sort - Keep semver validation on result for safety
There was a problem hiding this 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
🧹 Nitpick comments (1)
scripts/cicd/resolve-comfyui-release.ts (1)
1-254: Consider running prettier to align with project style.The file uses semicolons throughout, but the coding guidelines specify "no semicolons" as configured in
.prettierrc. While this doesn't affect functionality, maintaining consistent style across the codebase improves readability and reduces diff noise.Run
pnpm formaton this file to automatically apply project formatting rules:pnpm format scripts/cicd/resolve-comfyui-release.tsAs per coding guidelines: "Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in
.prettierrc"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/weekly-comfyui-release.yaml(1 hunks)scripts/cicd/resolve-comfyui-release.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursorrules)
Use es-toolkit for utility functions
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
Use TypeScript for type safety
**/*.{ts,tsx}: Never useanytype - use proper TypeScript types
Never useas anytype assertions - fix the underlying type issue
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.{ts,tsx,js,vue}
📄 CodeRabbit inference engine (.cursorrules)
Implement proper error handling in components and services
**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in.prettierrc
Organize imports by sorting and grouping by plugin, and runpnpm formatbefore committing
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use camelCase for variable and setting names in TypeScript/Vue files
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,vue}: Useconst settingStore = useSettingStore()andsettingStore.get('Comfy.SomeSetting')to retrieve settings in TypeScript/Vue files
Useawait settingStore.set('Comfy.SomeSetting', newValue)to update settings in TypeScript/Vue files
Check server capabilities usingapi.serverSupportsFeature('feature_name')before using enhanced features
Useapi.getServerFeature('config_name', defaultValue)to retrieve server feature configurationEnforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates
Files:
scripts/cicd/resolve-comfyui-release.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
UsedefaultsByInstallVersionproperty for gradual feature rollout based on version in settings configuration
Files:
scripts/cicd/resolve-comfyui-release.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Pull requests must include a clear description, linked issues in the format `- Fixes #123`, and screenshots/GIFs for UI changes
Applied to files:
.github/workflows/weekly-comfyui-release.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test
- GitHub Check: setup
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (10)
.github/workflows/weekly-comfyui-release.yaml (4)
1-17: LGTM! Well-structured workflow triggers.The scheduled and manual trigger configuration is clear and appropriate. The configurable fork input provides flexibility for testing.
30-98: LGTM! Resolver job is well-structured.The job correctly:
- Checks out both repositories with appropriate configurations
- Installs dependencies before running the tsx script (previously flagged issue has been resolved)
- Validates JSON output before parsing
- Sets outputs with clear error handling
- Provides a helpful summary
99-131: LGTM! Release trigger logic is correct.The conditional job properly:
- Runs only when a release is needed
- Uses appropriate error handling with
set -euo pipefail- Triggers the release workflow with correct parameters
- Provides clear feedback via summary
195-252: LGTM! PR creation logic handles edge cases correctly.The PR creation step properly:
- Documents the force-push behavior (lines 224-226)
- Pushes the branch before creating the PR
- Handles the "PR already exists" case gracefully
- Verifies the existing PR by checking the head branch
- Fails appropriately when PR creation fails for other reasons
The logic correctly assumes that if the branch push succeeds but PR creation fails, and an existing PR with the same head is found, the force-push has already updated that PR.
scripts/cicd/resolve-comfyui-release.ts (6)
1-37: LGTM! Clean imports and robust error handling.The exec function properly logs errors with context (command and directory) before returning the empty-string fallback. The ReleaseInfo interface is well-structured and type-safe.
39-62: LGTM! Robust version parsing.The function correctly:
- Checks for file existence
- Handles multiple version operators in requirements.txt format
- Uses a clear regex pattern to extract the version number
- Provides helpful error messages
64-81: LGTM! Comprehensive semantic version validation.The validation function properly:
- Checks type and nullability
- Requires exactly 3 parts
- Validates each part is a finite non-negative number
- Ensures string representation matches the parsed number (preventing issues with leading zeros or non-numeric characters)
83-110: LGTM! Efficient tag resolution with validation.The function correctly:
- Uses git's native version sorting for reliable results
- Validates the tag format with a strict regex before returning
- Provides clear error messages for invalid tags
- Handles the case where no tags exist
112-230: LGTM! Well-structured release resolution logic.The function properly:
- Validates all version strings before parsing (addresses previous comments)
- Checks that the target branch exists before proceeding
- Correctly determines whether a release is needed based on commit count
- Handles both cases: existing tags and first release for a minor version
- Validates all numeric values before use (patch numbers, commit counts)
- Returns a comprehensive ReleaseInfo object with all necessary metadata
232-254: LGTM! Clean CLI interface with export for reusability.The main execution properly:
- Validates required arguments
- Provides clear usage message
- Handles errors with appropriate exit codes
- Outputs structured JSON for workflow consumption
- Exports the main function for potential programmatic use
- Capture exit code separately from output - Fail workflow if gh pr list command fails - Distinguish between command failure vs no PR found - Check for null output from jq
- Use ANSI-C quoting $'\n\n' for actual newlines - Replace echo with printf for robust file writing - Fixes literal \n\n appearing in PR description
Adds scheduled workflow to bump ComfyUI frontend RC releases every Monday at noon PST.
Implementation
scripts/cicd/resolve-comfyui-release.ts): Checks ComfyUIrequirements.txtand determines next minor version, compares branch commits to latest patch tag.github/workflows/weekly-comfyui-release.yaml):release-version-bump.yamlworkflowcomfyanonymous/ComfyUIwith updatedrequirements.txtTesting
ghbinary added to ignore listFollow-up
Can test via workflow_dispatch once merged, or in this PR if we enable Actions on branch.
┆Issue is synchronized with this Notion page by Unito