Skip to content

feat(integ-runner): detect bootstrap errors and retry tests in valid regions - #1898

Open
mrgrain wants to merge 2 commits into
mainfrom
mrgrain/feat/integ-runner/bootstrap-error-retry
Open

feat(integ-runner): detect bootstrap errors and retry tests in valid regions#1898
mrgrain wants to merge 2 commits into
mainfrom
mrgrain/feat/integ-runner/bootstrap-error-retry

Conversation

@mrgrain

@mrgrain mrgrain commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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:

  • stops scheduling tests into the affected environment
  • retries the affected tests in the remaining environments
  • fails with a clear message if no environments are left
  • prints a summary with the fix for each skipped environment, e.g. cdk bootstrap --profile dev aws://123456789012/eu-west-1

toolkit-lib now reports bootstrap problems with a new BootstrapError carrying the affected account and region.

Re-work of #1115

Checklist

  • This change contains a major version upgrade for a dependency and I confirm all breaking changes are addressed
    • Release notes for the new version:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…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
@mrgrain
mrgrain deployed to automation August 25, 2026 16:14 — with GitHub Actions Active
@mrgrain
mrgrain deployed to automation August 25, 2026 16:14 — with GitHub Actions Active
@github-actions github-actions Bot added the p2 label Aug 25, 2026
@aws-cdk-automation
aws-cdk-automation requested a review from a team August 25, 2026 16:14
@mrgrain
mrgrain deployed to no-approval August 25, 2026 16:14 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@mrgrain
mrgrain deployed to no-approval August 25, 2026 16:42 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants