Skip to content

Fix aspnetcore perf-build CI failures found in first test runs - #5255

Merged
LoopedBard3 merged 2 commits into
dotnet:mainfrom
LoopedBard3:loopedbard3/aspnetcore-perf-build-cifixes
Jul 8, 2026
Merged

Fix aspnetcore perf-build CI failures found in first test runs#5255
LoopedBard3 merged 2 commits into
dotnet:mainfrom
LoopedBard3:loopedbard3/aspnetcore-perf-build-cifixes

Conversation

@LoopedBard3

Copy link
Copy Markdown
Member

Follow-up fixes for the aspnetcore perf-build pipeline (added in #5243) after the first internal test runs surfaced failures. All four fixes are validated end-to-end on internal build 3015786 — every stage green (Register Build, Build, Upload Artifacts to BCS) and all 5 per-RID runtime-pack nupkgs uploaded to the Build Cache Service.

Fixes

  1. Submodules — check out the aspnetcore repo resource with submodules: true on all three build jobs, so restore/build no longer fails on missing submodule files (CS2001).
  2. SHA macroresources.repositories.aspnetcore.version is not expanded inside the inline Azure CLI scripts. Expose it via a pipeline variable _AspNetCoreSha and reference $(_AspNetCoreSha) in the RegisterBuild and UploadArtifacts steps (this drives the BCS {sha} path).
  3. Windows reunify — collapse the three per-arch Windows jobs into one sequential Windows_build job (x64 native first, then x86/arm64 with -noBuildNative), matching ci-public.yml, and repoint the upload dispatcher's three aspnetcore_*_windows branches to it.
  4. Linux arm64 NativeAOT cross-link — the newer aspnetcoretools NativeAOT tool cross-links native code for aarch64-linux-gnu, which needs an arm64 sysroot. The plain 1es-ubuntu-2204 image has no /crossrootfs/arm64, so it failed to link (ld.lld: cannot open crti.o, missing -ldl/-lc/-lm/-lgcc). Run only the arm64 build.sh step in the dotnet cross prereq container (azurelinux-3.0-net11.0-cross-arm64, which bundles clang + the sysroot) via a step target, with -p:CrossBuild=true and ROOTFS_DIR=/crossrootfs/arm64. Pack/publish steps stay on the ubuntu host. Mirrors aspnetcore ci-public.yml's arm64 leg.

Validation

  • Internal run 3015786 — all stages succeeded; BCS upload completed.
  • Windows x64/x86/arm64, Linux x64, and Linux arm64 all produced and published their runtime-pack nupkgs.

Four fixes validated end-to-end on internal run 3015786 (all stages green,
nupkgs uploaded to BCS):

- Submodules: check out the aspnetcore resource with submodules so
  restore/build stops failing on missing submodule files.
- SHA macro: expose resources.repositories.aspnetcore.version via a
  pipeline variable (_AspNetCoreSha) and reference $(_AspNetCoreSha) in
  the RegisterBuild and UploadArtifacts steps; the raw resources.* macro
  is not expanded inside the inline scripts.
- Windows: reunify the per-arch Windows jobs into one sequential
  Windows_build job (x64 native first, then x86/arm64 with -noBuildNative),
  matching ci-public.yml, and repoint the upload dispatcher accordingly.
- Linux arm64 NativeAOT cross-link: run only the arm64 build.sh step in the
  dotnet cross prereq container (azurelinux-3.0-net11.0-cross-arm64, which
  bundles clang + /crossrootfs/arm64) via a step target, with
  -p:CrossBuild=true and ROOTFS_DIR. The plain 1es-ubuntu-2204 image has no
  arm64 sysroot, so the newer aspnetcoretools NativeAOT tool failed to link.
  Mirrors aspnetcore ci-public.yml's arm64 leg.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 21:16

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.

Pull request overview

This PR applies follow-up fixes to the aspnetcore perf-build Azure DevOps pipeline hosted in dotnet/performance, addressing failures discovered during initial internal test runs and ensuring BCS upload paths use the triggering aspnetcore commit SHA.

Changes:

  • Enable submodules: true on aspnetcore checkouts so builds no longer fail due to missing vendored submodule sources.
  • Capture the triggering aspnetcore SHA via a runtime expression (_AspNetCoreSha) and use it for RegisterBuild/UploadArtifacts BCS paths.
  • Reunify Windows x64/x86/arm64 into a single sequential job and update upload job dependencies; run the Linux arm64 build step in a cross-compile prereqs container with an arm64 sysroot.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
eng/pipelines/upload-build-artifacts-jobs.yml Repoints all aspnetcore_*_windows upload branches to depend on the unified Windows_build job.
eng/pipelines/aspnetcore-perf-build.yml Adds _AspNetCoreSha runtime variable and defines a cross-arm64 container resource; threads SHA to register/upload stages.
eng/pipelines/aspnetcore-perf-build-jobs.yml Adds submodule checkout, reunifies Windows into one job, and runs the Linux arm64 build step in the cross-arm64 container with cross-build flags/env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eng/pipelines/aspnetcore-perf-build-jobs.yml
@LoopedBard3 LoopedBard3 self-assigned this Jul 6, 2026
@LoopedBard3
LoopedBard3 marked this pull request as ready for review July 6, 2026 21:38
@LoopedBard3

Copy link
Copy Markdown
Member Author

Cancelled Performance-CI run as this PR doesn't impact the performance runs at all.

A repository-resource CI trigger (resources.repositories with a `trigger:`)
surfaces as Build.Reason == IndividualCI, not ResourceTrigger. The stage gates
only accepted ResourceTrigger|Manual, so aspnetcore-triggered runs queued but
skipped every stage (build did nothing). Accept IndividualCI instead. Safe
because self has trigger: none / pr: none, so IndividualCI can only originate
from the aspnetcore resource trigger.

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

Copy link
Copy Markdown
Member Author

@DrewScoggins DrewScoggins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@LoopedBard3
LoopedBard3 merged commit 8b1d923 into dotnet:main Jul 8, 2026
3 of 75 checks passed
@LoopedBard3
LoopedBard3 deleted the loopedbard3/aspnetcore-perf-build-cifixes branch July 8, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants