test(scriptless): Enable scriptless phase 3 in AB e2es#8453
Conversation
PR Title Lint Failed ❌Current Title: Your PR title doesn't follow the expected format. Please update your PR title to follow one of these patterns: Conventional Commits Format:
Guidelines:
Examples:
Please update your PR title and the lint check will run again automatically. |
There was a problem hiding this comment.
Pull request overview
Enables “scriptless phase 3” coverage in the AgentBaker e2e suite by adding a new scriptless_anc subtest path that provisions nodes using AKSNodeConfig/aks-node-controller, plus wiring many existing scenarios to provide an AKSNodeConfigMutator.
Changes:
- Added a new
scriptless_ancsubtest variant and runtime flag (EnableScriptlessANC) to drive scriptless phase-3 execution. - Refactored/expanded the e2e “aks-node-controller hack” customData generation to optionally include AKSNodeConfig and/or an nbc-cmd script.
- Updated many scenarios to set equivalent
AKSNodeConfigMutatorfields alongside existing NBC mutators.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| e2e/vmss.go | Refactors customData hack generation and wires scriptless ANC + NBC cmd hack paths into VMSS creation. |
| e2e/types.go | Adds EnableScriptlessANC and adjusts kubelet-config-file detection logic for scriptless ANC scenarios. |
| e2e/test_helpers.go | Adds scriptless_anc subtest generation and new gating helper. |
| e2e/scenario_test.go | Adds AKSNodeConfigMutator coverage across many existing scenarios. |
…scriptless/phase-3-e2e
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
aks-node-controller/app.go:476
- Passing both
--provision-configand--nbc-cmdcurrently triggerscompareEnvs, but the function then proceeds to execute the NBC script (because NBCCmd is prioritized) and does not provision from the AKSNodeConfig. If phase 3 intends to compare envs but still provision via ProvisionConfig, the command-selection logic needs to be adjusted (or a separate flag introduced) so both inputs can be present without changing provisioning behavior.
// If both flags are provided, compare environments before proceeding.
// This is best-effort and should not block provisioning.
if flags.ProvisionConfig != "" && flags.NBCCmd != "" {
slog.Info("ProvisionConfig and NBCCmd both provided, comparing envs")
compareEnvs(ctx, flags, a.eventLogger)
}
var cmd *exec.Cmd
if flags.NBCCmd != "" {
if err := applyNodeCustomData(a.getNodeCustomDataPath()); err != nil {
provisionResult.ExitCode = strconv.Itoa(240)
provisionResult.Error = err.Error()
return provisionResult, err
}
var err error
cmd, err = buildCmdFromNBCCmd(ctx, flags.NBCCmd)
if err != nil {
provisionResult.ExitCode = strconv.Itoa(240)
provisionResult.Error = err.Error()
return provisionResult, err
}
}
// If NBC command is provided, we prioritize it over the aks node config for provisioning.
if flags.ProvisionConfig != "" && flags.NBCCmd == "" {
var err error
| VM *ScenarioVM | ||
| VMSSName string | ||
| EnableScriptlessNBCCSECmd bool | ||
| EnableScriptlessANC bool |
There was a problem hiding this comment.
Does that mean if we move into phase 3 in production, we can safely remove the phase 2 tag EnableScriptlessNBCCSECmd? Trying to sort this out here because there will be 2 similar tags.
What this PR does / why we need it:
EnableScriptlessANCCustomDataPhase3to provide both ANC and NBC cse cmd to AKS node controllerWhich issue(s) this PR fixes:
Fixes #