Repository navigation
(janitor/flaky-test) allow graceful deployment interruption - #8905
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummarySingle-line change extending the graceful SIGTERM-to-SIGKILL escalation window in Assumptions: Files Reviewed (1 file)
Reviewed by deepseek-flash-latest · Input: 29.4K · Output: 2.3K · Cached: 235.9K Review guidance: REVIEW.md from base branch |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Evidence
10a3f4721dab:handles interruption by aborting deployment and releasing its leasefailed atscripts/deploy.test.mjs:565with0 !== 1becausedeploy_abortedwas never recorded.113c2a348097: the same named test failed with the identical signature while the other 26 deployment tests passed.Root cause and fix
The deploy runner sends
SIGTERMto Wrangler and escalates toSIGKILLafter 250 ms. Under CI scheduling pressure, the fake Wrangler process could be killed before its NodeSIGTERMhandler recordeddeploy_aborted. The parent deploy still exited asinterrupted, making the outcome timing-dependent.The graceful-shutdown window is now 1 second. Wrangler's
closeevent still cancels the forced-kill timer immediately, so normal cleanup does not wait for the full window. This preserves real graceful-abort behavior instead of modifying the test, adding a retry, or weakening its assertions. The test remains event-synchronized ondeploy_startedand still requires bothdeploy_abortedand lease release.Validation
pnpm --filter auto-routing-benchmark test: 53 files / 909 Vitest tests passed, plus all 27 deployment tests.pnpm --filter auto-routing-benchmark typecheck: passed.pnpm --filter auto-routing-benchmark lint: passed.git diff --check: passed.