1
1
# Create Hotfix Release
2
2
3
- This command guides you through creating a patch/hotfix release for ComfyUI Frontend with comprehensive safety checks and human confirmations at each step.
3
+ This command creates patch/hotfix releases for ComfyUI Frontend by backporting fixes to stable core branches. It handles both automated backports (preferred) and manual cherry-picking (fallback).
4
+
5
+ ** Process Overview:**
6
+ 1 . ** Check automated backports first** (via labels)
7
+ 2 . ** Skip to version bump** if backports already merged
8
+ 3 . ** Manual cherry-picking** if automation failed
9
+ 4 . ** Create patch release** with version bump
10
+ 5 . ** Publish GitHub release** (manually uncheck "latest")
11
+ 6 . ** Update ComfyUI requirements.txt** via PR
4
12
5
13
<task >
6
- Create a hotfix release by cherry-picking commits or PR commits from main to a core branch: $ARGUMENTS
14
+ Create a hotfix release by backporting commits/PRs from main to a core branch: $ARGUMENTS
7
15
8
16
Expected format: Comma-separated list of commits or PR numbers
9
17
Examples:
10
- - ` abc123,def456,ghi789 ` (commits )
11
- - ` #1234,#5678 ` (PRs )
12
- - ` abc123, #1234,def456 ` (mixed)
18
+ - ` #1234,#5678 ` (PRs - preferred )
19
+ - ` abc123,def456 ` (commit hashes )
20
+ - ` #1234,abc123 ` (mixed)
13
21
14
- If no arguments provided, the command will help identify the correct core branch and guide you through selecting commits/PRs.
22
+ If no arguments provided, the command will guide you through identifying commits/PRs to backport .
15
23
</task >
16
24
17
25
## Prerequisites
18
26
19
- Before starting, ensure:
20
- - You have push access to the repository
21
- - GitHub CLI (` gh ` ) is authenticated
22
- - You're on a clean working tree
23
- - You understand the commits/PRs you're cherry-picking
27
+ - Push access to repository
28
+ - GitHub CLI (` gh ` ) authenticated
29
+ - Clean working tree
30
+ - Understanding of what fixes need backporting
24
31
25
32
## Hotfix Release Process
26
33
27
- ### Step 1: Identify Target Core Branch
34
+ ### Step 1: Try Automated Backports First
35
+
36
+ ** Check if automated backports were attempted:**
37
+
38
+ 1 . ** For each PR, check existing backport labels:**
39
+ ``` bash
40
+ gh pr view # 1234 --json labels | jq -r '.labels[].name'
41
+ ```
42
+
43
+ 2 . ** If no backport labels exist, add them now:**
44
+ ``` bash
45
+ # Add backport labels (this triggers automated backports)
46
+ gh pr edit # 1234 --add-label "needs-backport"
47
+ gh pr edit # 1234 --add-label "1.24" # Replace with target version
48
+ ```
49
+
50
+ 3 . ** Check for existing backport PRs:**
51
+ ``` bash
52
+ # Check for backport PRs created by automation
53
+ PR_NUMBER=${ARGUMENTS%% ,* } # Extract first PR number from arguments
54
+ PR_NUMBER=${PR_NUMBER# \# } # Remove # prefix
55
+ gh pr list --search " backport-${PR_NUMBER} -to" --json number,title,state,baseRefName
56
+ ```
57
+
58
+ 4 . ** Handle existing backport scenarios:**
59
+
60
+ ** Scenario A: Automated backports already merged**
61
+ ``` bash
62
+ # Check if backport PRs were merged to core branches
63
+ gh pr list --search " backport-${PR_NUMBER} -to" --state merged
64
+ ```
65
+ - If backport PRs are merged → Skip to Step 10 (Version Bump)
66
+ - ** CONFIRMATION** : Automated backports completed, proceeding to version bump?
67
+
68
+ ** Scenario B: Automated backport PRs exist but not merged**
69
+ ``` bash
70
+ # Show open backport PRs that need merging
71
+ gh pr list --search " backport-${PR_NUMBER} -to" --state open
72
+ ```
73
+ - ** ACTION REQUIRED** : Merge the existing backport PRs first
74
+ - Use: ` gh pr merge [PR_NUMBER] --merge ` for each backport PR
75
+ - After merging, return to this command and skip to Step 10 (Version Bump)
76
+ - ** CONFIRMATION** : Have you merged all backport PRs? Ready to proceed to version bump?
77
+
78
+ ** Scenario C: No automated backports or they failed**
79
+ - Continue to Step 2 for manual cherry-picking
80
+ - ** CONFIRMATION** : Proceeding with manual cherry-picking because automation failed?
81
+
82
+ ### Step 2: Identify Target Core Branch
28
83
29
84
1 . Fetch the current ComfyUI requirements.txt from master branch:
30
85
``` bash
@@ -36,7 +91,7 @@ Before starting, ensure:
36
91
5 . Verify the core branch exists: ` git ls-remote origin refs/heads/core/* `
37
92
6 . ** CONFIRMATION REQUIRED** : Is ` core/X.Y ` the correct target branch?
38
93
39
- ### Step 2 : Parse and Validate Arguments
94
+ ### Step 3 : Parse and Validate Arguments
40
95
41
96
1 . Parse the comma-separated list of commits/PRs
42
97
2 . For each item:
@@ -49,7 +104,7 @@ Before starting, ensure:
49
104
- ** CONFIRMATION REQUIRED** : Use merge commit or cherry-pick individual commits?
50
105
4 . Validate all commit hashes exist in the repository
51
106
52
- ### Step 3 : Analyze Target Changes
107
+ ### Step 4 : Analyze Target Changes
53
108
54
109
1 . For each commit/PR to cherry-pick:
55
110
- Display commit hash, author, date
@@ -60,7 +115,7 @@ Before starting, ensure:
60
115
2 . Identify potential conflicts by checking changed files
61
116
3 . ** CONFIRMATION REQUIRED** : Proceed with these commits?
62
117
63
- ### Step 4 : Create Hotfix Branch
118
+ ### Step 5 : Create Hotfix Branch
64
119
65
120
1 . Checkout the core branch (e.g., ` core/1.23 ` )
66
121
2 . Pull latest changes: ` git pull origin core/X.Y `
@@ -69,7 +124,7 @@ Before starting, ensure:
69
124
- Example: ` hotfix/1.23.4-20241120 `
70
125
5 . ** CONFIRMATION REQUIRED** : Created branch correctly?
71
126
72
- ### Step 5 : Cherry-pick Changes
127
+ ### Step 6 : Cherry-pick Changes
73
128
74
129
For each commit:
75
130
1 . Attempt cherry-pick: ` git cherry-pick <commit> `
@@ -83,7 +138,7 @@ For each commit:
83
138
- Run validation: ` pnpm typecheck && pnpm lint `
84
139
4 . ** CONFIRMATION REQUIRED** : Cherry-pick successful and valid?
85
140
86
- ### Step 6 : Create PR to Core Branch
141
+ ### Step 7 : Create PR to Core Branch
87
142
88
143
1 . Push the hotfix branch: ` git push origin hotfix/<version>-<timestamp> `
89
144
2 . Create PR using gh CLI:
@@ -100,7 +155,7 @@ For each commit:
100
155
- Impact assessment
101
156
5 . ** CONFIRMATION REQUIRED** : PR created correctly?
102
157
103
- ### Step 7 : Wait for Tests
158
+ ### Step 8 : Wait for Tests
104
159
105
160
1 . Monitor PR checks: ` gh pr checks `
106
161
2 . Display test results as they complete
@@ -111,15 +166,15 @@ For each commit:
111
166
4 . Wait for all required checks to pass
112
167
5 . ** CONFIRMATION REQUIRED** : All tests passing?
113
168
114
- ### Step 8 : Merge Hotfix PR
169
+ ### Step 9 : Merge Hotfix PR
115
170
116
171
1 . Verify all checks have passed
117
172
2 . Check for required approvals
118
173
3 . Merge the PR: ` gh pr merge --merge `
119
174
4 . Delete the hotfix branch
120
175
5 . ** CONFIRMATION REQUIRED** : PR merged successfully?
121
176
122
- ### Step 9 : Create Version Bump
177
+ ### Step 10 : Create Version Bump
123
178
124
179
1 . Checkout the core branch: ` git checkout core/X.Y `
125
180
2 . Pull latest changes: ` git pull origin core/X.Y `
@@ -131,7 +186,7 @@ For each commit:
131
186
7 . Commit: ` git commit -m "[release] Bump version to 1.23.5" `
132
187
8 . ** CONFIRMATION REQUIRED** : Version bump correct?
133
188
134
- ### Step 10 : Create Release PR
189
+ ### Step 11 : Create Release PR
135
190
136
191
1 . Push release branch: ` git push origin release/1.23.5 `
137
192
2 . Create PR with Release label:
@@ -184,7 +239,7 @@ For each commit:
184
239
```
185
240
5. **CONFIRMATION REQUIRED**: Release PR has "Release" label?
186
241
187
- ### Step 11 : Monitor Release Process
242
+ ### Step 12 : Monitor Release Process
188
243
189
244
1. Wait for PR checks to pass
190
245
2. **FINAL CONFIRMATION**: Ready to trigger release by merging?
@@ -199,7 +254,102 @@ For each commit:
199
254
- PyPI upload
200
255
- pnpm types publication
201
256
202
- ### Step 12: Post-Release Verification
257
+ ### Step 13: Manually Publish Draft Release
258
+
259
+ **CRITICAL**: The release workflow creates a DRAFT release. You must manually publish it:
260
+
261
+ 1. **Go to GitHub Releases:** https://github.com/Comfy-Org/ComfyUI_frontend/releases
262
+ 2. **Find the DRAFT release** (e.g., "v1.23.5 Draft")
263
+ 3. **Click "Edit release"**
264
+ 4. **UNCHECK "Set as the latest release"** ⚠️ **CRITICAL**
265
+ - This prevents the hotfix from showing as "latest"
266
+ - Main branch should always be "latest release"
267
+ 5. **Click "Publish release"**
268
+ 6. **CONFIRMATION REQUIRED**: Draft release published with "latest" unchecked?
269
+
270
+ ### Step 14: Create ComfyUI Requirements.txt Update PR
271
+
272
+ **IMPORTANT**: Create PR to update ComfyUI's requirements.txt via fork:
273
+
274
+ 1. **Setup fork (if needed):**
275
+ ```bash
276
+ # Check if fork already exists
277
+ if gh repo view ComfyUI --json owner | jq -r '.owner.login' | grep -q "$(gh api user --jq .login)"; then
278
+ echo "Fork already exists"
279
+ else
280
+ # Fork the ComfyUI repository
281
+ gh repo fork comfyanonymous/ComfyUI --clone=false
282
+ echo "Created fork of ComfyUI"
283
+ fi
284
+ ```
285
+
286
+ 2. **Clone fork and create branch:**
287
+ ```bash
288
+ # Clone your fork (or use existing clone)
289
+ GITHUB_USER=$(gh api user --jq .login)
290
+ if [ ! -d "ComfyUI-fork" ]; then
291
+ gh repo clone ${GITHUB_USER}/ComfyUI ComfyUI-fork
292
+ fi
293
+
294
+ cd ComfyUI-fork
295
+ git checkout master
296
+ git pull origin master
297
+
298
+ # Create update branch
299
+ BRANCH_NAME="update-frontend-${NEW_VERSION}"
300
+ git checkout -b ${BRANCH_NAME}
301
+ ```
302
+
303
+ 3. **Update requirements.txt:**
304
+ ```bash
305
+ # Update the version in requirements.txt
306
+ sed -i "s/comfyui-frontend-package==[0-9].*$/comfyui-frontend-package==${NEW_VERSION}/" requirements.txt
307
+
308
+ # Verify the change
309
+ grep "comfyui-frontend-package" requirements.txt
310
+
311
+ # Commit the change
312
+ git add requirements.txt
313
+ git commit -m "Bump frontend to ${NEW_VERSION}"
314
+ git push origin ${BRANCH_NAME}
315
+ ```
316
+
317
+ 4. **Create PR from fork:**
318
+ ```bash
319
+ # Create PR using gh CLI from fork
320
+ gh pr create \
321
+ --repo comfyanonymous/ComfyUI \
322
+ --title "Bump frontend to ${NEW_VERSION}" \
323
+ --body "$(cat <<EOF
324
+ Bump frontend to ${NEW_VERSION}
325
+
326
+ \`\`\`
327
+ python main.py --front-end-version Comfy-Org/ComfyUI_frontend@${NEW_VERSION}
328
+ \`\`\`
329
+
330
+ - Diff: [Comfy-Org/ComfyUI_frontend: v${OLD_VERSION}...v${NEW_VERSION}](https://github.com/Comfy-Org/ComfyUI_frontend/compare/v${OLD_VERSION}...v${NEW_VERSION})
331
+ - PyPI Package: https://pypi.org/project/comfyui-frontend-package/${NEW_VERSION}/
332
+ - npm Types: https://www.npmjs.com/package/@comfyorg/comfyui-frontend-types/v/${NEW_VERSION}
333
+
334
+ ## Changes
335
+
336
+ - Fix: [Brief description of hotfixes included]
337
+ EOF
338
+ )"
339
+ ` ` `
340
+
341
+ 5. ** Clean up:**
342
+ ` ` ` bash
343
+ # Return to original directory
344
+ cd ..
345
+
346
+ # Keep fork directory for future updates
347
+ echo " Fork directory ' ComfyUI-fork' kept for future use"
348
+ ` ` `
349
+
350
+ 6. ** CONFIRMATION REQUIRED** : ComfyUI requirements.txt PR created from fork?
351
+
352
+ # ## Step 15: Post-Release Verification
203
353
204
354
1. Verify GitHub release:
205
355
` ` ` bash
@@ -213,12 +363,14 @@ For each commit:
213
363
` ` ` bash
214
364
pnpm view @comfyorg/[email protected]
215
365
` ` `
216
- 4. Generate release summary with:
366
+ 4. Monitor ComfyUI requirements.txt PR for approval/merge
367
+ 5. Generate release summary with:
217
368
- Version released
218
369
- Commits included
219
370
- Issues fixed
220
371
- Distribution status
221
- 5. **CONFIRMATION REQUIRED**: Release completed successfully?
372
+ - ComfyUI integration status
373
+ 6. ** CONFIRMATION REQUIRED** : Hotfix release fully completed?
222
374
223
375
# # Safety Checks
224
376
@@ -240,19 +392,28 @@ If something goes wrong:
240
392
241
393
# # Important Notes
242
394
395
+ - ** Always try automated backports first** - This command is for when automation fails
243
396
- Core branch version will be behind main - this is expected
244
397
- The " Release" label triggers the PyPI/npm publication
398
+ - ** CRITICAL** : Always uncheck " Set as latest release" for hotfix releases
399
+ - ** Must create ComfyUI requirements.txt PR** - Hotfix isn' t complete without it
245
400
- PR numbers must include the `#` prefix
246
401
- Mixed commits/PRs are supported but review carefully
247
402
- Always wait for full test suite before proceeding
248
403
249
- ## Expected Timeline
404
+ ## Modern Workflow Context
405
+
406
+ **Primary Backport Method:** Automated via `needs-backport` + `X.YY` labels
407
+ **This Command Usage:**
408
+ - Smart path detection - skip to version bump if backports already merged
409
+ - Fallback to manual cherry-picking only when automation fails/has conflicts
410
+ **Complete Hotfix:** Includes GitHub release publishing + ComfyUI requirements.txt integration
411
+
412
+ ## Workflow Paths
413
+
414
+ - **Path A:** Backports already merged → Skip to Step 10 (Version Bump)
415
+ - **Path B:** Backport PRs need merging → Merge them → Skip to Step 10 (Version Bump)
416
+ - **Path C:** No/failed backports → Manual cherry-picking (Steps 2-9) → Version Bump (Step 10)
250
417
251
- - Step 1-3: ~10 minutes (analysis)
252
- - Steps 4-6: ~15-30 minutes (cherry-picking)
253
- - Step 7: ~10-20 minutes (tests)
254
- - Steps 8-10: ~10 minutes (version bump)
255
- - Step 11-12: ~15-20 minutes (release)
256
- - Total: ~60-90 minutes
257
418
258
- This process ensures a safe, verified hotfix release with multiple confirmation points and clear tracking of what changes are being released .
419
+ This process ensures a complete hotfix release with proper GitHub publishing, ComfyUI integration, and multiple safety checkpoints .
0 commit comments