feat(integ-runner): detect bootstrap errors and retry tests in valid regions - #1898
Open
mrgrain wants to merge 2 commits into
Open
feat(integ-runner): detect bootstrap errors and retry tests in valid regions#1898mrgrain wants to merge 2 commits into
mrgrain wants to merge 2 commits into
Conversation
…regions When running with --parallel-regions, a non-bootstrapped region caused every test scheduled there to fail with unhelpful errors, wasting CI time and cluttering the output. toolkit-lib: - Add a BootstrapError class (with ToolkitError.isBootstrapError type guard) that carries the account and region of the failure - Throw it where a missing or outdated bootstrap stack is detected (version validation, missing version SSM parameter, legacy assets without a toolkit stack) - Preserve the error type through the re-wrapping sites in Deployments.validateBootstrapStackVersion and the per-stack deploy error handler, so the type survives to callers integ-runner: - Detect BootstrapError in the test worker (walking the error cause chain) and emit a NOT_BOOTSTRAPPED diagnostic instead of a failure - Track usable environments in an EnvironmentPool; a bootstrap error removes the environment so no further tests are scheduled there - Retry affected tests in the remaining environments using bounded rounds; if no environments remain, fail them with a clear message - Print an end-of-run summary of removed environments with the exact `cdk bootstrap` command needed to fix each one
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
The integ-runner now detects when a test failed only because its AWS environment is not bootstrapped. Previously a single non-bootstrapped region would fail every test scheduled into it with a cryptic deployment error and keep receiving more tests, ruining the whole run.
When a bootstrap error is detected, the integ-runner now:
cdk bootstrap --profile dev aws://123456789012/eu-west-1toolkit-lib now reports bootstrap problems with a new
BootstrapErrorcarrying the affected account and region.Re-work of #1115
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license