Skip to content

feat: oras migrate to dalec built - #9913

Open
Xinhe Li (fseldow) wants to merge 13 commits into
mainfrom
xinhl/orasdalec
Open

Xinhe Li (fseldow) wants to merge 13 commits into
mainfrom
xinhl/orasdalec

Conversation

@fseldow

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
feat: oras migrate to dalec built

Which issue(s) this PR fixes:

Fixes #

Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
@fseldow
Xinhe Li (fseldow) requested review from a team as code owners October 27, 2026 03:39
Copilot AI balanced review requested due to automatic review settings October 27, 2026 03:39
@github-actions github-actions Bot added the components This pull request updates cached components on Linux or Windows VHDs label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   1m 8s ⏱️
663 tests 663 ✅ 0 💤 0 ❌
686 runs  686 ✅ 0 💤 0 ❌

Results for commit 8657377.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The migration leaves Linux provisioning without the unversioned ORAS executable and Windows OCI bootstrap using the wrong download URL.

2 open issues
What changed in this PR

Migrates ORAS used by AgentBaker VHD builds to Dalec-built packages while preserving legacy downloads for Flatcar and ACL.

Changes:

  • Uses package download and binary extraction helpers for Ubuntu and Azure Linux.
  • Adds Linux package metadata and switches Windows ORAS from 1.3.5 to Dalec revision 1.3.5-2.
  • Reformats unrelated component entries without changing their values.
File Description
vhdbuilder/​packer/​install-dependencies.sh Routes supported Linux ORAS downloads through package caching helpers.
parts/​common/​components.json Defines Linux package versions and the Windows Dalec download URL.

Review effort: Balanced

Comment thread parts/common/components.json Outdated
Comment thread vhdbuilder/packer/install-dependencies.sh Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 04:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The distribution migration needs human confirmation of artifact layouts and successful Linux and Windows VHD builds, including OCI pulls.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 04:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Linux validation gap remains unresolved, and cross-platform package and archive compatibility needs confirmation through representative VHD builds.

2 open issues

Review effort: Balanced

Comment on lines +597 to +598
downloadPkgFromVersion "${name}" "${version}" "${downloadDir}"
cacheVersionedKubernetesPackageBinary "${name}" "${version}" "${downloadDir}" || exit $ERR_ORAS_DOWNLOAD_ERROR
@fseldow Xinhe Li (fseldow) changed the title feat: oras migrate to dalec built [WIP] feat: oras migrate to dalec built Oct 27, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human confirmation of Linux installation validation is needed before approving this provisioning-dependency migration.

2 open issues

Review effort: Balanced

Signed-off-by: Xinhe Li <xinhl@microsoft.com>
f
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 08:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

On Ubuntu, the helper queries oras instead of the Debian package az-oras, preventing the intended download; package lookup and executable naming must be separated while keeping the cached binary and symlink named oras.

3 open issues

Review effort: Balanced

Comment thread vhdbuilder/packer/install-dependencies.sh Outdated
Resolve components.json conflict: keep Windows oras on the Dalec package and
bump it to 1.3.6-1 to match main's oras 1.3.6 update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: fseldow <22195282+fseldow@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 21:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new Linux ORAS package-installation path lacks ShellSpec coverage, and URL-less manifest entries bypass VHD validation, allowing a missing or unusable ORAS binary to go undetected.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment on lines +786 to +790
downloadPkgFromVersion "${name}" "${version}" "${downloadDir}"
cacheVersionedKubernetesPackageBinary "${name}" "${version}" "${downloadDir}" || exit $ERR_ORAS_DOWNLOAD_ERROR
version_no_epoch="${version#*:}"
oras_version="${version_no_epoch%%-*}"
ln -sf "/opt/bin/${name}-${oras_version}" "/opt/bin/${name}" || exit $ERR_ORAS_DOWNLOAD_ERROR
PMC publishes oras as 'az-oras' on Ubuntu and 'oras' on Azure Linux; the binary is /usr/bin/oras in both. Add an optional binary_name arg to cacheVersionedKubernetesPackageBinary so the package and binary names can differ.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 02:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new ORAS entries omit downloadURL, causing VHD content checks to skip ORAS validation and allowing a missing executable or broken symlink to pass without explicit validation and ShellSpec coverage.

3 open issues

Review effort: Balanced

Comment on lines +793 to +797
downloadPkgFromVersion "${orasPkgName}" "${version}" "${downloadDir}"
cacheVersionedKubernetesPackageBinary "${orasPkgName}" "${version}" "${downloadDir}" "${name}" || exit $ERR_ORAS_DOWNLOAD_ERROR
version_no_epoch="${version#*:}"
oras_version="${version_no_epoch%%-*}"
ln -sf "/opt/bin/${name}-${oras_version}" "/opt/bin/${name}" || exit $ERR_ORAS_DOWNLOAD_ERROR
@fseldow Xinhe Li (fseldow) changed the title [WIP] feat: oras migrate to dalec built feat: oras migrate to dalec built Oct 29, 2026
- add azurelinuxkata v3.0 ORAS entry so kata no longer falls back to the upstream default version
- add az-oras/oras to the Renovate revision-stripping rule
- add Linux VHD content check for /opt/bin/oras symlink, executable and version with ShellSpec coverage
- drop stale oras signature-skip entry in windows-files-check.ps1
- document az-oras package naming in README-COMPONENTS.md
- revert unrelated components.json formatting churn

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

VHD validation fails on AzureLinuxOSGuard because ORAS’s <SKIP> version is treated as a required binary, and the changed package installation path lacks ShellSpec coverage.

4 open issues

Review effort: Balanced

testContainerd "$version" "$pkgName"
;;
"oras")
testOrasBinaryInstalled "$version"
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 08:06
DALEC-built oras reports versions like 1.3.5+ubuntu.24.04; strip the +metadata before comparing. Also silence SC2016 in the spec helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new ORAS check does not honor OSGuard’s <SKIP> sentinel, causing VHD validation to fail for an intentionally omitted component; it needs a skip guard and an OSGuard regression test.

4 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 29, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The ORAS check ignores the <SKIP> sentinel on AzureLinuxOSGuard, causing VHD validation to fail even though the build intentionally skips ORAS.

4 open issues

Review effort: Balanced

Use installPackageFromCache/installRPMPackageFromFile instead of extending cacheVersionedKubernetesPackageBinary, which is now unchanged from main. oras is installed directly to /opt/bin/oras; OS entries with a downloadURL keep the upstream archive path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 10:14
@github-actions

Copy link
Copy Markdown
Contributor

Changes cached containers or packages on windows VHDs

Please get a Windows SIG member to approve.

The following dif file shows any additions or deletions from what will be cached on windows VHDs organised by VHD type.

  • Additions are new things cached.
  • Deletions are things no longer cached.
diff --git a/vhd_files/2022-containerd-gen2.txt b/vhd_files/2022-containerd-gen2.txt
index 5bc88ed..09abae6 100644
--- a/vhd_files/2022-containerd-gen2.txt
+++ b/vhd_files/2022-containerd-gen2.txt
@@ -1 +1 @@
-c:\aks-tools\oras\: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+c:\aks-tools\oras\: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
@@ -147 +147 @@ Windows 2022-containerd-gen2 package kubernetes-binaries default: https://packag
-Windows 2022-containerd-gen2 package oras default: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+Windows 2022-containerd-gen2 package oras default: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
diff --git a/vhd_files/2022-containerd.txt b/vhd_files/2022-containerd.txt
index 5ae164e..448d44c 100644
--- a/vhd_files/2022-containerd.txt
+++ b/vhd_files/2022-containerd.txt
@@ -1 +1 @@
-c:\aks-tools\oras\: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+c:\aks-tools\oras\: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
@@ -147 +147 @@ Windows 2022-containerd package kubernetes-binaries default: https://packages.ak
-Windows 2022-containerd package oras default: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+Windows 2022-containerd package oras default: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
diff --git a/vhd_files/2025-gen2-tl.txt b/vhd_files/2025-gen2-tl.txt
index bdeda19..8189cdc 100644
--- a/vhd_files/2025-gen2-tl.txt
+++ b/vhd_files/2025-gen2-tl.txt
@@ -1 +1 @@
-c:\aks-tools\oras\: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+c:\aks-tools\oras\: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
@@ -83 +83 @@ Windows 2025-gen2-tl package kubernetes-binaries default: https://packages.aks.a
-Windows 2025-gen2-tl package oras default: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+Windows 2025-gen2-tl package oras default: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
diff --git a/vhd_files/2025-gen2.txt b/vhd_files/2025-gen2.txt
index 76c8ff8..b3d92c1 100644
--- a/vhd_files/2025-gen2.txt
+++ b/vhd_files/2025-gen2.txt
@@ -1 +1 @@
-c:\aks-tools\oras\: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+c:\aks-tools\oras\: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
@@ -83 +83 @@ Windows 2025-gen2 package kubernetes-binaries default: https://packages.aks.azur
-Windows 2025-gen2 package oras default: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+Windows 2025-gen2 package oras default: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
diff --git a/vhd_files/2025.txt b/vhd_files/2025.txt
index 710954c..296b827 100644
--- a/vhd_files/2025.txt
+++ b/vhd_files/2025.txt
@@ -1 +1 @@
-c:\aks-tools\oras\: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+c:\aks-tools\oras\: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip
@@ -83 +83 @@ Windows 2025 package kubernetes-binaries default: https://packages.aks.azure.com
-Windows 2025 package oras default: https://github.com/oras-project/oras/releases/download/v1.3.6/oras_1.3.6_windows_amd64.zip
+Windows 2025 package oras default: https://packages.aks.azure.com/dalec-packages/oras/1.3.6/windows/amd64/oras_1.3.6-1_amd64.zip

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 28% ❌
staging_cse_windows Package 1 68% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 73% ➖
Summary 39% (1830 / 7020) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 29% ❌
Summary 29% (4702 / 16405) ❌

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The ORAS validation ignores AzureLinuxOSGuard’s <SKIP> setting, causing intentionally absent binaries to fail otherwise valid VHD content checks.

5 open issues

Review effort: Balanced

Comment on lines +786 to +789
if [ -z "${PACKAGE_DOWNLOAD_URL}" ] && isUbuntu; then
# The Ubuntu PMC package is named az-oras but ships /usr/bin/oras
downloadPkgFromVersion "az-oras" "${version}" "/opt/${name}/downloads" || exit $ERR_ORAS_DOWNLOAD_ERROR
installPackageFromCache "${name}" "${version}" "/opt/bin/${name}" || exit $ERR_ORAS_DOWNLOAD_ERROR
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
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 89% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
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 78% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
Summary 75% (6059 / 8026) ➖

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components This pull request updates cached components on Linux or Windows VHDs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants