Uh oh!
There was an error while loading. Please reload this page.
fix: increase label retry window to prevent race condition with opened-event required-label checks - #28896
Conversation
…d-event required-label checks - LABEL_MAX_RETRIES: 3 → 5 (now 1 initial + 5 retries = 6 total attempts) - Add explicit LABEL_MAX_DELAY_MS = 30000 (was defaulting to 10 000 ms) - New retry schedule: 6 s, 12 s, 24 s, 30 s, 30 s — max ~102 s vs previous ~26 s - Add actionable hint in warning message suggesting the labeled event as an alternative - Update test to expect 6 total addLabels calls (was 4) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/a98000a7-2ad2-432f-8905-f57672c1b5fe Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Extends the label-application retry window when creating pull requests to better handle GitHub’s transient REST→GraphQL node-id resolution delay, reducing CI failures on opened workflows that require labels.
Changes:
- Increased
LABEL_MAX_RETRIESfrom 3 to 5 for label operations. - Added an explicit
LABEL_MAX_DELAY_MS = 30000cap to the label retry backoff configuration. - Updated the retry-exhaustion unit test expectations to match the new retry count and timing commentary.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/create_pull_request.cjs | Expands and caps label retry backoff behavior; adds a warning hint about opened vs labeled event checks. |
actions/setup/js/create_pull_request.test.cjs | Updates test expectations for the increased number of addLabels attempts and revised delay schedule commentary. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Uh oh!
There was an error while loading. Please reload this page.
🧪 Test Quality Sentinel ReportTest Quality Score: 95/100✅ Excellent test quality
Test Classification Details
AnalysisThe single modified test updates the retry exhaustion scenario to reflect the new
Mocking is limited to the GitHub API ( The minor 5-point deduction is for the Language SupportTests analyzed:
Verdict
📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators. References:§25048060386
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment. |
GitHub's REST-to-GraphQL bridge can take 30–60+ seconds to resolve a newly-created PR's node ID, causing
issues.addLabelsto fail with a transient unprocessable error. The previous retry ceiling (~26 s total) was insufficient to beat the 30-second wait manypull_request_targetworkflows use before checking required labels, resulting in failed CI on theopenedevent even though the label is eventually applied.Changes
LABEL_MAX_RETRIES3 → 5 — extends to 1 initial + 5 retries = 6 total attemptsLABEL_MAX_DELAY_MS = 30000— previously fell back to the default 10 s cap; new retry schedule is 6 s → 12 s → 24 s → 30 s → 30 s (~102 s max vs. ~26 s before)labeledevent as a fallback for repositories where this race condition persistsaddLabelscalls (was 4)