fix: add strict deb version match in VHD containerd content test#8960
Open
abigailliang-aks-sig-node wants to merge 5 commits into
Open
fix: add strict deb version match in VHD containerd content test#8960abigailliang-aks-sig-node wants to merge 5 commits into
abigailliang-aks-sig-node wants to merge 5 commits into
Conversation
abigailliang-aks-sig-node
requested review from
AbelHu,
Devinwong,
SriHarsha001,
awesomenix,
calvin197,
cameronmeissner,
djsly,
ganeshkumarashok,
karenychen,
lilypan26,
mxj220,
pdamianov-dev,
phealy,
r2k1,
runzhen,
sulixu,
surajssd,
timmy-wright,
titilambert,
xuexu6666 and
zachary-bailey
as code owners
July 15, 2026 21:20
abigailliang-aks-sig-node
force-pushed
the
fix/strict-containerd-version-content-test
branch
from
July 15, 2026 21:29
6af5478 to
f541322
Compare
The VHD content test previously only validated major.minor.patch for containerd and crictl (via binary --version), ignoring the hotfix suffix (e.g. u1 vs u2). This allowed mismatches between components.json and the actual installed package to go undetected until e2e. Changes: - Add assertPackageVersion helper that uses dpkg-query (deb) or rpm (RPM-based) to compare the full installed version against components.json - Resolve the real package name dynamically from components.json renovateTag via getPackageJSON (handles moby-containerd on Ubuntu, containerd2 on Azure Linux 3.0, etc.) - Fail fast when package name cannot be resolved from renovateTag - Fix err() call signatures to match the two-argument format - Add local test script for package name extraction verification
…atches mismatch DO NOT MERGE - this commit will be reverted after CI confirms the content test fails at VHD build time (not at e2e).
abigailliang-aks-sig-node
force-pushed
the
fix/strict-containerd-version-content-test
branch
from
July 16, 2026 20:45
9079e42 to
6c4c257
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…t test catches mismatch" This reverts commit 6c4c257.
Devinwong
reviewed
Jul 17, 2026
| @@ -0,0 +1,96 @@ | |||
| #!/bin/bash | |||
Collaborator
There was a problem hiding this comment.
This script file is not called or referenced by anyone, right?
Contributor
Author
There was a problem hiding this comment.
this a local test file starting as test_....
I originally planned to add a ShellSpec test, but ces_hepler.sh does not work well in the ShellSpec Docker environment. As a temporary solution, I’m keeping this as a local test script for manual validation.
And one of the follow-up is to figure out a way to unit test vhdbuilder/packer/test/linux-vhd-content-test.sh in ci
abigailliang-aks-sig-node
enabled auto-merge (squash)
July 17, 2026 20:29
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
Add strict full-version matching in the VHD content test for containerd and cri-tools, catching version drift at VHD build time rather than in e2e.
Problem
The VHD content test (
testContainerd/testCriCtl) previously only comparedmajor.minor.patch(stripping the hotfix suffix viacut -d- -f1). This meant:components.jsonsays2.3.2-ubuntu24.04u12.3.2-ubuntu24.04u2(due to apt wildcardmoby-containerd=2.3.2*)2.3.2==2.3.2)Changes
assertPackageVersionhelper: usesdpkg-query(deb) orrpm(RPM-based) to compare the full installed version against components.jsoncomponents.jsonrenovateTag viagetPackageJSON— handlesmoby-containerd(Ubuntu),containerd2(Azure Linux 3.0), etc.err()call signatures to match the two-argument format ($1=test name,$2=message)debPackageName→installedPackageNamesince the check now covers both deb and rpmFollow-up items
getPackageJSON+ renovateTag parsing) was attempted but deferred.cse_helpers.shhas system dependencies (/etc/*-release, etc.) that make it difficult to source in the shellspec Docker environment. Extracting individual functions viasedis fragile. A proper fix would require refactoringgetPackageJSONand its helpers into a standalone sourceable module.testPackagesInstalledcurrently skips entirely on ARM64 (line 209), meaning ARM64 VHDs have no package version validation. Opening this up to ARM64 would require verifying that all packages incomponents.jsonhave correct ARM64 entries and that the download/install paths work for arm64.Test plan
getPackageJSONcorrectly resolves package names for all OS variants viatest_pkg_name_extraction.sh:components.jsonversion passes content testhttps://github.com/Azure/AgentBaker/pull/8960/checks?check_run_id=87739564057
https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=172577610&view=results