Skip to content

fix(e2e): test VHDs built from the main or dev branch under test - #10188

Closed
Artur Khantimirov (r2k1) wants to merge 1 commit into
devfrom
r2k1-e2e-branch-based-vhd-selection
Closed

Artur Khantimirov (r2k1) wants to merge 1 commit into
devfrom
r2k1-e2e-branch-based-vhd-selection

Conversation

@r2k1

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 4444ffeef1aa1b13acbc739e41a4857bcd4f2d2c

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ shellspec spec/e2e/e2e_runner_scripts_spec.sh: 24 examples, 0 failures.
↑ The 4 new branch cases fail without the script change.
↑ ShellCheck (bash and POSIX pass) is clean.
↓ Not run in an ADO E2E pipeline yet; PR CI is pending.
↓ On main, effect depends on Linux images tagged refs/heads/main, which do not exist yet.

What this PR does / why we need it:

Goal: main and PRs to main test images built from main. dev and PRs to dev test images built from dev.

When VHD_BUILD_ID and SIG_VERSION_TAG_VALUE are unset, .pipelines/scripts/e2e_run.sh now sets SIG_VERSION_TAG_NAME=branch and SIG_VERSION_TAG_VALUE to refs/heads/main or refs/heads/dev:

  • PR runs (BUILD_REASON=PullRequest) use SYSTEM_PULLREQUEST_TARGETBRANCH. GitHub gives main without refs/heads/, so the script normalizes it.
  • Other runs use BUILD_SOURCEBRANCH.
  • Other branches (official/*, windows/*, feature branches) keep the Go default from e2e/config (refs/heads/dev on dev).
  • An explicit SIG_VERSION_TAG_VALUE is kept. VHD_BUILD_ID still wins.

Impact:

  • On dev, behavior does not change: dev already defaults to refs/heads/dev (fix: set default e2e image tag to dev #10133).
  • The change matters for main. e2e_run.sh is identical on main and dev, so this commit can be cherry-picked to main.

Prerequisite before the main cherry-pick:

  • Linux images tagged branch=refs/heads/main must exist. Gallery PackerSigGalleryEastUS (rg aksvhdtestbuildrg) has 0 Linux versions tagged refs/heads/main across 34 Linux image definitions; all are tagged refs/heads/dev. Only Windows images have main tags.
  • Cause: the only scheduled run of pipeline 172842 ([TEST All VHDs] AKS Linux VHD Build) is a UI-defined daily 01:00 schedule on +refs/heads/dev; the YAML has trigger: none. vhdbuilder/packer/cleanup.sh deletes SIG versions older than 168h (7 days).
  • Main therefore needs a schedule of at most ~6 days (daily recommended) on 172842. Add it in the ADO UI, because UI schedules override YAML schedules. This adds VHD build cost.

Related: draft PR #10186 on main restores #10133 (Entra ID cluster profile, default tag). The main cherry-pick of this PR should follow #10186 and the main VHD schedule.

Validation:

  • shellspec spec/e2e/e2e_runner_scripts_spec.sh: passed, 24 examples, 0 failures. The 4 new branch cases fail without the script change.
  • shellcheck .pipelines/scripts/e2e_run.sh spec/e2e/e2e_runner_scripts_spec.sh: passed.
  • shellcheck --shell=sh -i SC3010 -i SC3014 .pipelines/scripts/e2e_run.sh: passed.

Which issue(s) this PR fixes:

Fixes #

When VHD_BUILD_ID and SIG_VERSION_TAG_VALUE are unset, e2e_run.sh now
selects SIG images tagged branch=<branch>: the PR target branch for PR
runs, or Build.SourceBranch for CI and scheduled runs. Only main and dev
are mapped; other branches keep the e2e default.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   21 suites   55s ⏱️
817 tests 817 ✅ 0 💤 0 ❌
844 runs  844 ✅ 0 💤 0 ❌

Results for commit 4444ffe.

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
parts_windows Package 1 74% ➖
staging_cse_windows Package 1 72% ➖
debug 0% ❌
provisioningscripts 2% ❌
Summary 40% (2077 / 7284) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 30% ❌
Summary 30% (5112 / 16927) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-live-patching/pkg/status 100% ✔
github.com/Azure/agentbaker/apiserver 24% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 35% ❌
github.com/Azure/agentbaker/pkg/agent 79% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 78% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
github.com/Azure/agentbaker/aks-node-controller 73% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 91% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
Summary 84% (6228 / 8196) ✔

@r2k1

Copy link
Copy Markdown
Contributor Author

Closing: dev already tests dev images by default, so this change is not needed. Main will keep its refs/heads/main default and get main-built VHDs instead.

@r2k1
Artur Khantimirov (r2k1) deleted the r2k1-e2e-branch-based-vhd-selection branch November 25, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant