Skip to content

Add Azure Linux 4 .NET 10 and 11 Chrome test images - #1838

Merged
richlander merged 3 commits into
mainfrom
richlander/al4-release-chrome
Nov 25, 2026
Merged

richlander merged 3 commits into
mainfrom
richlander/al4-release-chrome

Conversation

@richlander

@richlander richlander commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Add Azure Linux 4 x64 Chrome test-image variants for .NET 10 and .NET 11:

  • azurelinux-4.0-net10.0-build-aot-test-chrome-amd64
  • azurelinux-4.0-net11.0-build-aot-test-chrome-amd64

Add the missing supporting images: the .NET 10 managed-build base and the .NET 10/11 host-native AOT test layers. Register all five additions in the Azure Linux manifest. Existing CODEOWNERS patterns already cover them.

The managed-build recipe matches the existing Azure Linux 4 .NET 11 base, including sudo. The AOT and Chrome recipes match their .NET 12 counterparts except for the version-specific FROM references. The earlier sudo removal has been reverted: .NET 10 installs it in the new managed-build base, and .NET 11 retains it from the existing managed-build base. Existing managed-build bases are unchanged. Chrome and ChromeDriver remain pinned to 158.0.8127.36, and both Chrome images include the libatomic fix.

Node defaults to the latest Node 24 packages available from Azure Linux at image build time, not an upstream patch-version pin. The sudo-restoration builds reused cached layers containing Node 24.22.1 and npm 11.19.1; the earlier sudo-free rebuilds contained Node 24.22.3. Release-branch consumer migrations should use this packaged default instead of overriding it with the existing UseNode 24.14.1 pin.

This extends the image family introduced in #1825 and corrected in #1836:
#1825
#1836

These variants prepare for separate ASP.NET Core release-branch browser-container migrations, following the main-branch consumer:
dotnet/aspnetcore#70689

Validation

Latest validation: sudo restored

  • Passed: docker build --progress=plain for all five exact Dockerfiles, using tags copilot/al4-release-sudo-4830:net10-build, :net10-aot, :net10-chrome, :net11-aot, and :net11-chrome. BuildKit reused cached layers; dependent builds used --build-context <original-FROM-reference>=docker-image://<rebuilt-local-parent> without changing recipes or shared MCR tags.
  • Passed: docker run --rm --network none --entrypoint bash <image> -ec 'rpm -q sudo; sudo -n true; sudo -n -u nobody id -un | grep -x nobody' in all five rebuilt images. Each contains sudo-1.9.17-12.p2.azl4; root invocation and switching to nobody both succeed. The sudo execution requirement fails as expected in both preceding sudo-free Chrome images.
  • Passed: Git, PowerShell, Node, npm, Clang, Chrome and ChromeDriver version checks in both restored Chrome images; libatomic remains installed.
  • Passed: docker run --rm -i --entrypoint hadolint hadolint/hadolint:v2.12.0 --failure-threshold error - < <Dockerfile> for both modified recipes, and git diff --check. Existing Hadolint warnings remain.
  • The first lint invocation omitted the image's required hadolint executable; rerunning with the explicit entry point passed. The first tooling probe treated CHROMEWEBDRIVER as an executable rather than a directory; rerunning with $CHROMEWEBDRIVER/chromedriver passed. No source changes were needed for either harness correction.
  • Full hosted Azure Pipelines agent/job execution, browser navigation and NativeAOT publication were not repeated for this sudo-restoration update. Earlier browser and NativeAOT checks are recorded below.

Historical sudo-free validation (superseded by restoration)

  • Passed: rebuild all five exact Dockerfiles with docker build --progress=plain, tagged copilot/al4-release-nosudo-4830:net10-build, :net10-aot, :net10-chrome, :net11-aot, and :net11-chrome. Dependent builds use --build-context <original-FROM-reference>=docker-image://<rebuilt-local-parent> to consume rebuilt parents without changing recipes or shared MCR tags. The existing .NET 11 managed base is unchanged.
  • Passed: docker run --rm --network none --entrypoint bash <image> -c '! command -v sudo && ! rpm -q sudo' for all five rebuilt images. The same absence check fails for both original Chrome images, which contain sudo-1.9.17-12.p2.azl4.
  • Passed: Git, PowerShell 7.7.0, Node 24.22.3, npm 11.19.1, Clang and Azure CLI start in both sudo-free Chrome images; libatomic remains installed.
  • Passed: EXPECTED_NODE_VERSION=v24.22.3 node /tmp/al4-release-chrome-probe.mjs as the non-root named user chromeprobe in both rebuilt Chrome images. The existing probe asserts Chrome/ChromeDriver 158.0.8127.36, browser navigation, title and body content. The probe accepts an explicit expected Node version; its original 24.22.1 default is unchanged.
  • Passed: the existing .NET 10/11 NativeAOT smoke binaries execute in the corresponding rebuilt AOT images without an SDK. NativeAOT publication was not repeated after removing sudo.
  • Passed: hadolint --failure-threshold error src/azurelinux/4.0/net10.0/build/amd64/Dockerfile src/azurelinux/4.0/net11.0/build-aot-test/amd64/Dockerfile using the existing Hadolint v2.12.0 container, and git diff --check. Existing warnings remain unchanged.

During the superseded sudo-free experiment, the first .NET 11 rebuild failed because Azure Linux protects sudo from package-manager removal; the temporary removal command overrode that protection and disabled automatic dependency cleanup. That removal command is no longer present. The initial browser probes could not read the host-owned fixture directory as the non-root user; copying the fixture to a readable file inside each disposable container corrected the harness prerequisite without changing host permissions. Full Azure Pipelines agent/job execution without sudo was not verified.

Earlier pre-removal validation

  • Passed: direct docker build of all five new Dockerfiles in dependency order; the existing .NET 11 managed base was pulled from MCR. The repository's build.ps1/ImageBuilder wrapper was not run.

  • Passed: both final images start Git, self-contained PowerShell 7.7.0, and Azure Linux's packaged Node 24.22.1 and npm 11.19.1; libatomic is installed.

  • Passed: real non-root, named-user WebDriver sessions in both images with the packaged Node default, using TEST_CHROME_BINARY and CHROMEWEBDRIVER. Temporary probes asserted Node and Chrome/driver versions, page navigation, title, and body content.

  • Passed: secondary compatibility checks with the release branches' existing Node 24.14.1 and npm 11.11.0, including the same named-user WebDriver assertions. This older version was supplied only for validation; it is not the image default.

  • Passed: .NET 10 and .NET 11 NativeAOT console publication in the corresponding AOT layers, with SDKs supplied only for validation. Each native executable then ran in its unmodified AOT image without an installed SDK.

  • Passed: Hadolint on all five new recipes using hadolint --failure-threshold error -. Existing recipe warnings remain unchanged.

  • Passed: repository metadata/CODEOWNERS tests via the command below. TRX verified: Passed: 6, Failed: 0, Skipped: 0.

    docker run --rm \
      --mount type=bind,src="$(pwd)",dst=/repo \
      -w /repo mcr.microsoft.com/dotnet/sdk:11.0 \
      pwsh -NoProfile -File ./run-tests.ps1
  • Passed: manifest parsing, unique new tags, recipe parity, and git diff --cached --check.

Scope

No existing images or ASP.NET Core consumers change. Azure Linux 3 Chrome variants, Nginx variants, release-branch E2E qualification, and main-branch browser-failure investigation are separate work. These host-native test images do not change shipping NativeAOT ABI requirements.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richlander
richlander requested review from a team as code owners November 21, 2026 21:42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richlander
richlander enabled auto-merge (squash) November 25, 2026 03:29
Restore the .NET 10 managed-base package and retain inherited sudo in the .NET 11 AOT layer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richlander
richlander merged commit d5a4507 into main Nov 25, 2026
13 checks passed
@richlander
richlander deleted the richlander/al4-release-chrome branch November 25, 2026 13:42
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.

2 participants