Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies the e2e test infrastructure to add support for configurable VM size and location variables, and increases timeout values to accommodate longer-running test scenarios. The changes span the e2e configuration, pipeline template, and the e2e run script.
Changes:
- Increases cluster creation timeout from 20 to 30 minutes in e2e config
- Doubles the e2e pipeline timeout from 90 to 180 minutes
- Adds VM_SIZE and LOCATION as optional pipeline variables that can override defaults
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| e2e/config/config.go | Increases TestTimeoutCluster default from 20m to 30m |
| .pipelines/templates/e2e-template.yaml | Doubles timeoutInMinutes from 90 to 180 |
| .pipelines/scripts/e2e_run.sh | Adds exports for VM_SIZE→DEFAULT_VM_SKU and LOCATION variables with echo statements for debugging |
…add-vm-size-e2e-pipeline-variable
| gen2Only, err := CachedIsVMSizeGen2Only(ctx, VMSizeSKURequest{ | ||
| Location: s.Location, | ||
| VMSize: config.Config.DefaultVMSKU, | ||
| }) | ||
| require.NoError(s.T, err, "checking if VM size %q supports only Gen2", config.Config.DefaultVMSKU) | ||
| if gen2Only && s.Config.VHD.UnsupportedGen2 { | ||
| s.T.Logf("VM size %q only supports Gen2 hypervisor but image does not, falling back to vm size that supported gen 1 %q", config.Config.DefaultVMSKU, config.DefaultV5VMSKU) | ||
| config.Config.DefaultVMSKU = config.DefaultV5VMSKU | ||
| } | ||
| supportsNVMe, err := CachedVMSizeSupportsNVMe(ctx, VMSizeSKURequest{ | ||
| Location: s.Location, | ||
| VMSize: config.Config.DefaultVMSKU, | ||
| }) | ||
| require.NoError(s.T, err, "checking if VM size %q supports only NVMe", config.Config.DefaultVMSKU) | ||
| if supportsNVMe { | ||
| if s.Config.VHD.UnsupportedNVMe { | ||
| s.T.Logf("VM size %q supports NVMe disk controller but image does not support NVMe, falling back to vm size that supports SCSI %q", config.Config.DefaultVMSKU, config.DefaultV5VMSKU) | ||
| config.Config.DefaultVMSKU = config.DefaultV5VMSKU |
There was a problem hiding this comment.
This mutates the global config.Config.DefaultVMSKU at runtime. Since RunScenario calls t.Parallel() by default, this introduces a cross-test data race and can cause unrelated scenarios to start using the fallback SKU. It also happens after getBaseNBC / nbcToAKSNodeConfigV1 have already read DefaultVMSKU, so the VM size used in the bootstrapping config can diverge from the VMSS size. Instead, compute an effective VM size as a scenario-local value (e.g., on Scenario/ScenarioRuntime) before building NBC/AKSNodeConfig and VMSS model, and never mutate the global config during test execution.
| gen2Only, err := CachedIsVMSizeGen2Only(ctx, VMSizeSKURequest{ | |
| Location: s.Location, | |
| VMSize: config.Config.DefaultVMSKU, | |
| }) | |
| require.NoError(s.T, err, "checking if VM size %q supports only Gen2", config.Config.DefaultVMSKU) | |
| if gen2Only && s.Config.VHD.UnsupportedGen2 { | |
| s.T.Logf("VM size %q only supports Gen2 hypervisor but image does not, falling back to vm size that supported gen 1 %q", config.Config.DefaultVMSKU, config.DefaultV5VMSKU) | |
| config.Config.DefaultVMSKU = config.DefaultV5VMSKU | |
| } | |
| supportsNVMe, err := CachedVMSizeSupportsNVMe(ctx, VMSizeSKURequest{ | |
| Location: s.Location, | |
| VMSize: config.Config.DefaultVMSKU, | |
| }) | |
| require.NoError(s.T, err, "checking if VM size %q supports only NVMe", config.Config.DefaultVMSKU) | |
| if supportsNVMe { | |
| if s.Config.VHD.UnsupportedNVMe { | |
| s.T.Logf("VM size %q supports NVMe disk controller but image does not support NVMe, falling back to vm size that supports SCSI %q", config.Config.DefaultVMSKU, config.DefaultV5VMSKU) | |
| config.Config.DefaultVMSKU = config.DefaultV5VMSKU | |
| vmSize := config.Config.DefaultVMSKU | |
| gen2Only, err := CachedIsVMSizeGen2Only(ctx, VMSizeSKURequest{ | |
| Location: s.Location, | |
| VMSize: vmSize, | |
| }) | |
| require.NoError(s.T, err, "checking if VM size %q supports only Gen2", vmSize) | |
| if gen2Only && s.Config.VHD.UnsupportedGen2 { | |
| s.T.Logf("VM size %q only supports Gen2 hypervisor but image does not, falling back to vm size that supported gen 1 %q", vmSize, config.DefaultV5VMSKU) | |
| vmSize = config.DefaultV5VMSKU | |
| } | |
| supportsNVMe, err := CachedVMSizeSupportsNVMe(ctx, VMSizeSKURequest{ | |
| Location: s.Location, | |
| VMSize: vmSize, | |
| }) | |
| require.NoError(s.T, err, "checking if VM size %q supports only NVMe", vmSize) | |
| if supportsNVMe { | |
| if s.Config.VHD.UnsupportedNVMe { | |
| s.T.Logf("VM size %q supports NVMe disk controller but image does not support NVMe, falling back to vm size that supports SCSI %q", vmSize, config.DefaultV5VMSKU) | |
| vmSize = config.DefaultV5VMSKU |
What this PR does / why we need it:
AB e2e adjustments needed to run v7 skus. Primarily:
Which issue(s) this PR fixes:
Fixes #