Repository navigation
feat: oras migrate to dalec built - #9913
Xinhe Li (fseldow) wants to merge 13 commits into
Conversation
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Windows Unit Test Results 3 files 18 suites 1m 8s ⏱️ Results for commit 8657377. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
🟡 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.5to Dalec revision1.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
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xinhe Li <xinhl@microsoft.com>
| downloadPkgFromVersion "${name}" "${version}" "${downloadDir}" | ||
| cacheVersionedKubernetesPackageBinary "${name}" "${version}" "${downloadDir}" || exit $ERR_ORAS_DOWNLOAD_ERROR |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xinhe Li <xinhl@microsoft.com>
There was a problem hiding this comment.
🟡 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
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>
There was a problem hiding this comment.
🟡 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
| 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>
There was a problem hiding this comment.
🟡 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
| 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 |
- 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>
| testContainerd "$version" "$pkgName" | ||
| ;; | ||
| "oras") | ||
| testOrasBinaryInstalled "$version" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xinhe Li <xinhl@microsoft.com>
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>
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>
Changes cached containers or packages on windows VHDsPlease 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.
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 |
| 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 |
|



What this PR does / why we need it:
feat: oras migrate to dalec built
Which issue(s) this PR fixes:
Fixes #