Commit 1c8b3ce
(Risk 1) Fix already_in_queue to detect pre-GA queue branches after GA tag
After a GA tag is pushed (e.g. 10.0.0.0), HotfixBranch.hfrev advances from
0 to 1. The next PR handle call would compute queue name q/w/{id}/10.0.0.1/...
which does not exist, causing already_in_queue to return False and re-queue
the PR — creating an orphaned q/10.0.0.1 branch alongside the valid one.
Fix: after the exact-match lookup, fall back to a git branch -r --list prefix
scan (origin/q/w/{id}/major.minor.micro.*) so the existing pre-GA queue branch
is found regardless of which hfrev was in effect when the PR was first queued.
Add test_pr_hotfix_no_requeue_after_ga: queues pre-GA, pushes 10.0.0.0 tag,
then re-handles the PR — asserts NothingToDo (not Queued) and verifies no
orphaned 10.0.0.1 branch is created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d904bee commit 1c8b3ce
2 files changed
+52
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6033 | 6033 | | |
6034 | 6034 | | |
6035 | 6035 | | |
| 6036 | + | |
| 6037 | + | |
| 6038 | + | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
| 6048 | + | |
| 6049 | + | |
| 6050 | + | |
| 6051 | + | |
| 6052 | + | |
| 6053 | + | |
| 6054 | + | |
| 6055 | + | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
| 6064 | + | |
| 6065 | + | |
| 6066 | + | |
| 6067 | + | |
| 6068 | + | |
| 6069 | + | |
| 6070 | + | |
| 6071 | + | |
6036 | 6072 | | |
6037 | 6073 | | |
6038 | 6074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
132 | 145 | | |
133 | 146 | | |
134 | 147 | | |
| |||
0 commit comments