ci(e2e): add multi-AZ fallback for EC2 instance creation#491
Merged
Conversation
When AWS lacks capacity in a single AZ, the E2E runner job fails with InsufficientInstanceCapacity. Loop through comma-separated subnet IDs (one per AZ) until launch succeeds. Reads vars.AWS_SUBNET_IDS (comma-separated), falls back to the existing vars.AWS_SUBNET_ID for backward compatibility.
3 tasks
DorianZheng
added a commit
that referenced
this pull request
May 10, 2026
The workflow's multi-AZ fallback (#491) iterates over `AWS_SUBNET_IDS`, but the setup script only saved one subnet (`AWS_SUBNET_ID`), so the fallback degenerated to a single-AZ try. Run today hit InsufficientInstanceCapacity for c8i.4xlarge in us-east-1f and gave up even though five other AZs were available. Enumerate every public subnet in the VPC, comma-join, and write `AWS_SUBNET_IDS`. Delete the legacy `AWS_SUBNET_ID` variable so the workflow's `vars.AWS_SUBNET_IDS || vars.AWS_SUBNET_ID` fallback can't silently revert to a narrower pool.
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.
Summary
InsufficientInstanceCapacityerror in one AZ automatically retries the nextEC2_SUBNET_ID→EC2_SUBNET_IDS; readsvars.AWS_SUBNET_IDSwith fallback tovars.AWS_SUBNET_IDfor backward compatibility::warningannotation; all-AZ failure emits::errorand exitsSetup required
Set the
AWS_SUBNET_IDSrepository variable to a comma-separated list of subnet IDs across different AZs in the same VPC, e.g.:Test plan
AWS_SUBNET_IDis set (noAWS_SUBNET_IDS) → works as beforeAWS_SUBNET_IDSwith multiple subnets → first available AZ is used