Skip to content

Internal 2xx fixes - #4932

Merged
mthalman merged 11 commits into
dotnet:release/10.0.2xxfrom
mthalman:internal-2xx-fixes
Feb 20, 2026
Merged

mthalman merged 11 commits into
dotnet:release/10.0.2xxfrom
mthalman:internal-2xx-fixes

Conversation

@mthalman

@mthalman mthalman commented Feb 18, 2026 •

Copy link
Copy Markdown
Member

Port of the changes from https://dev.azure.com/dnceng/internal/_git/dotnet-dotnet/pullrequest/58074

Problem

Non-1xx feature band branches (2xx, 3xx, etc.) exclude runtime-dependent components from their builds. They only build SDK tooling and reuse the shared runtime from the 1xx band. Because the runtime isn't built, the bootstrap process (which downloads CentOS artifacts and bootstraps them to be portable) cannot work. Since the SDK being used is non-portable, it results in an attempt to get a non-portable CrossGen package which doesn't exist from the PSB artifacts (which are currently portable) -- see https://dev.azure.com/dnceng/internal/_build/results?buildId=2906286&view=logs&j=0c2a1884-6715-550d-a904-b6e3cc3a6e36&t=3cbdffe4-1ca5-5d9e-d978-72178c29357a. Instead, the pipeline needs to download non-portable, RID-specific previously source-built artifacts directly instead.

Additionally, when downloading archives from authenticated (internal) storage, curl -O derives the output filename from the full URL including the SAS token query string, resulting in a "File name too long" error (seen on AlmaLinux).

Fix

  1. Download RID-specific artifacts up front (vmr-build.yml): The "Download Source-Built Archives" step now downloads the non-portable, RID-specific Private.SourceBuilt.Artifacts archive into prereqs/packages/archive/. When prep-source-build.sh runs later, it finds the artifacts already present and skips both the centos download and the bootstrap. The prep step is also updated to pass --no-bootstrap --artifacts-rid explicitly.
  2. Fix curl filename too long (download-source-built-archive.sh): DownloadWithRetries now accepts an optional output filename and uses curl -o instead of curl -O, preventing the SAS token query parameters from being included in the output filename.
  3. Update leg names to reflect that they are using PSB SDK instead of Microsoft SDK in non-1xx builds.
  4. Minor cleanup: Consolidated the SDK and shared-components download steps into a single script block with nested conditions, and fixed a YAML validation error where reuseBuildArtifactsFrom (an object/array parameter) was interpolated as a string — now uses length() instead.

mthalman and others added 7 commits February 18, 2026 09:05
Download non-portable, RID-specific Private.SourceBuilt.Artifacts in the
Download Source-Built Archives step so that prep-source-build.sh finds
them already present and skips downloading centos artifacts and
bootstrapping to portable. Pass --no-bootstrap and --artifacts-rid to
the prep script for the excludeRuntimeDependentJobs case.

Co-authored-by: Copilot <[email protected]>
Use curl -o with an explicit output filename instead of curl -O, which
derives the filename from the full URL including SAS token query strings,
causing 'File name too long' errors on authenticated downloads.

Co-authored-by: Copilot <[email protected]>
For non-1xx feature bands, the SDK used is a previous source-built SDK,
not a Microsoft SDK. Rename the build job suffix from MsftSdk to
PreviousSourceBuiltSdk when excludeRuntimeDependentJobs is true to
accurately reflect this. The existing PreviousSourceBuiltSdk legs (which
use withPreviousSDK) are excluded for non-1xx since they are redundant.

Introduce an sbBuildSuffix variable to avoid repeating the conditional
logic in consuming templates.

Co-authored-by: Copilot <[email protected]>
The removed PreviousSourceBuiltSdk leg had enablePoison: true.
Carry that forward to the centos signing/artifact leg when
excludeRuntimeDependentJobs is true.

Co-authored-by: Copilot <[email protected]>
@mthalman
mthalman marked this pull request as ready for review February 18, 2026 22:35
@mthalman
mthalman requested review from a team as code owners February 18, 2026 22:35
Matt Thalman and others added 3 commits February 20, 2026 10:24
Fixes some issues that were introduced in https://dev.azure.com/dnceng/internal/_git/dotnet-dotnet/pullrequest/58074

- Restore 'Offline_' prefix in sbBuildSuffix endsWith check so only offline legs get DotNetSourceOnlyPublishArtifacts=true, matching the original 'Offline_MsftSdk' behavior before commit 1247ba8.
- Add IsPublishPass2 guard to the recursive Publish MSBuild call in PublishSourceBuild.props to prevent CreatePrivateSourceBuiltArtifactsArchive from triggering again on the second pass. Caused by publishing in conjunction with poisoning enabled.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix addressing an infinite loop in the source-build publish pass.

#### PR Summary
This PR refines conditional checks to prevent repeated publishing during source-build.
- In `eng/PublishSourceBuild.props`, the publish target condition now includes an extra check (`$(IsPublishPass2)` not equal to true) to avoid duplicate execution.
- In `eng/pipelines/templates/stages/source-build-and-validate.yml`, the build name condition is updated to use an "Offline_" prefix format for correctly flagging source-build artifact publishing.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
#### AI description  (iteration 1)
#### PR Classification
This pull request fixes source build issues for internal builds by updating pipeline configurations, tool detection logic, and dependency versions.

#### PR Summary
The changes update various scripts and pipeline templates to ensure robust internal builds with the latest dependencies and correct feed setups.
- **`/eng/common/tools.ps1`**: Improved Visual Studio requirement detection by adding error handling and conditional checks for tool settings.
- **`/eng/pipelines/templates/steps/vmr-validate-installers.yml` & `/eng/pipelines/pr.yml`**: Added an inline PowerShell task to configure internal NuGet feeds and refined PR build conditions to skip specified authors.
- **`/eng/common/core-templates/post-build/post-build.yml`**, **`/eng/common/core-templates/job/publish-build-assets.yml`**, & **`/eng/common/templates/variables/pool-providers.yml`**: Upgraded image settings from vs2019 to vs2022 to align with updated build environment requirements.
- **`/global.json`**, **`/eng/Version.Details.xml`**, & **`/eng/Versions.props`**: Updated .NET tool and Arcade SDK versions to newer revisions.
- **`/repo-projects/scenario-tests.proj`**: Added a configuration to retain internal NuGet feed prefixes, ensuring tests use the correct sources.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
@mthalman
mthalman enabled auto-merge (squash) February 20, 2026 19:33
@mthalman
mthalman merged commit 3a01e3a into dotnet:release/10.0.2xx Feb 20, 2026
8 checks passed
@mthalman
mthalman deleted the internal-2xx-fixes branch February 20, 2026 19:39
@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/10.0.3xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.3xx (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

@mthalman backporting to release/10.0.3xx failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Move build steps into a shared 'if' condition for excludeRuntimeDependentJobs
Using index info to reconstruct a base tree...
M	eng/pipelines/templates/jobs/vmr-build.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/templates/jobs/vmr-build.yml
Applying: Relabel SDK download step
Applying: Download RID-specific source-built artifacts instead of centos
error: sha1 information is lacking or useless (eng/pipelines/templates/jobs/vmr-build.yml).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 Download RID-specific source-built artifacts instead of centos
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

mthalman added a commit to mthalman/dotnet that referenced this pull request Feb 23, 2026
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Matt Thalman <[email protected]>
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="Publish"
Condition="'$(DotNetSourceOnlyPublishArtifacts)' == 'true'"
Condition="'$(DotNetSourceOnlyPublishArtifacts)' == 'true' and '$(IsPublishPass2)' != 'true'"

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.

I just noticed that this fix isn't present in main and forward ported it via #8276. I would double check that there isn't anything else from this PR missing.

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.

3 participants