Skip to content

[DO NOT MERGE / DO NOT REVIEW] Validate stabilization is a single-line change on top of #15681 - #17320

Closed
Jose Perez Rodriguez (joperezr) wants to merge 13 commits into
microsoft:mainfrom
joperezr:joperezr/dummy-validate-stabilization-on
Closed

Jose Perez Rodriguez (joperezr) wants to merge 13 commits into
microsoft:mainfrom
joperezr:joperezr/dummy-validate-stabilization-on

Conversation

@joperezr

Copy link
Copy Markdown
Member

🚨 DO NOT MERGE — DO NOT REVIEW 🚨

This is a throwaway validation PR. It exists only to exercise CI for the changes proposed in #15681 by flipping the one knob that those changes claim should be the only knob needed when stabilizing a release.

What this PR does

Flips StabilizePackageVersion to true in eng/Versions.props. That is the entire diff (one line). The branch is stacked on top of #15681's automate-helix-versions branch — meaning this PR's diff against main is the union of #15681's changes + this one-line flip.

What it is testing

#15681 introduces a mechanism that dynamically computes Helix test package versions, restores PR-time prerelease semantics under stabilization (via DotNetFinalVersionKind=prerelease for PR builds), and adds a stabilization_check CI job. The claim is:

Going forward, stabilizing a release for 13.4 (and beyond) is a single-line change in eng/Versions.props. No more hand-editing of Directory.Packages.Helix.props, no more dropping the compute_version_suffix step from ci.yml, no more [ActiveIssue] tags on KubernetesDeploy tests, no more SKIP lists in the polyglot scripts.

This PR tests that claim by performing only the single-line flip and letting CI exercise:

  1. PR build verification (the unstable / dogfood path): DotNetFinalVersionKind=prerelease should keep PR builds producing unique prerelease versions even with StabilizePackageVersion=true set globally, so dynamic Helix package versions still line up and dogfood install still verifies a unique build.
  2. stabilization_check job: should still pass under the same global flag, validating that PR-time stable-pack + version-sensitive CLI smoke + aspire init + aspire restore against the stable feed all succeed without any of the historical workarounds.
  3. Helix tests that previously broke on stabilization branches (the KubernetesDeploy E2E set, polyglot SDK validation) should now pass with no special-case skips, because PR-time builds remain prerelease.

If CI is green here, the claim in #15681 is validated empirically.

What to do with this PR

Close it once CI has completed and the relevant signal has been observed. Do not merge.

Linked: #15681, #15335.

@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17320

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17320"

@joperezr
Jose Perez Rodriguez (joperezr) force-pushed the joperezr/dummy-validate-stabilization-on branch from 0df869a to ff00c48 Compare May 20, 2026 20:19
Jose Perez Rodriguez (joperezr) added a commit to joperezr/aspire that referenced this pull request May 20, 2026
Two issues found via the dummy validation PR (microsoft#17320) CI run:

1. SDK 10.0.x dotnet test requires --project <path>, not a positional project arg.
2. --no-build caused MTP to report 'Zero tests ran' even when the assembly
   was built in the previous step. Dropping it lets dotnet test handle the
   build itself (no-op when nothing changed, as is the case here).

Co-authored-by: Copilot <[email protected]>
@joperezr
Jose Perez Rodriguez (joperezr) force-pushed the joperezr/dummy-validate-stabilization-on branch from ff00c48 to f0f0550 Compare May 20, 2026 20:22
Issue microsoft#15335 / fixes the manual workaround pile that 13.1, 13.2, 13.3 stabilization PRs
had to maintain.

PR ci.yml: pass /p:DotNetFinalVersionKind=prerelease alongside the existing
/p:VersionSuffix=pr.NNNNN.gSHA so PR builds keep producing unique prerelease versions
even when StabilizePackageVersion=true is flipped on a release branch. Together with
the dynamic Helix package-version computation in this PR, that removes the need to
manually strip the compute_version_suffix step at stabilization time.

stabilization_check job: a new PR-only gate that runs ./build.sh -pack with
StabilizePackageVersion=true, runs the version/channel/template-pinning subset of
Aspire.Cli.Tests under that build, and runs an aspire init + aspire restore smoke
against the locally-built stable feed. Catches NU5104 (stable depends on preview)
and the restore-time failures that historically forced 13.x stabilization PRs to
hand-skip whole test classes. Job is wired into results: needs so branch protection
enforces it from day one; on push events the job runs but no-ops so the results:
contains(needs.*.result, ''skipped'') check doesn''t fire.

The smoke script lives at eng/scripts/stabilization-smoke-init-restore.sh and is
runnable locally for repro (see prerequisites at the top of the script).

Co-authored-by: Copilot <[email protected]>
Comments describe what the code does, not which PR/issue they were authored under.

Co-authored-by: Copilot <[email protected]>
STABILIZATION_SMOKE_CONFIGURATION (default: Debug) and STABILIZATION_SMOKE_FEED
(default: artifacts/packages/<config>/Shipping) let local users point the smoke at
a Release-config pack or a custom feed path without editing the script.

Co-authored-by: Copilot <[email protected]>
Exercises the user-visible 'create a project' flow, the templates package, and
template version-pinning end-to-end. Uses a source-mapped NuGet.config so Aspire.*
packages are pinned to the local stable feed (so a missing or preview-only Aspire dep
fails restore here) while non-Aspire transitives flow from the public dotnet feeds.

Verification accepts either single-file (apphost.cs) or project-based (.AppHost.csproj)
layout, since the CLI's template-resolution may map aspire-empty to either shape over time.

Co-authored-by: Copilot <[email protected]>
Two issues found via the dummy validation PR (microsoft#17320) CI run:

1. SDK 10.0.x dotnet test requires --project <path>, not a positional project arg.
2. --no-build caused MTP to report 'Zero tests ran' even when the assembly
   was built in the previous step. Dropping it lets dotnet test handle the
   build itself (no-op when nothing changed, as is the case here).

Co-authored-by: Copilot <[email protected]>
aspire end-users only configure nuget.org by default — the smoke should match
that shape. Drops the dotnet-public / dotnet-eng / dotnet9 / dotnet10 internal
mirrors that were copied from tests/Shared/nuget-with-package-source-mapping.config
(those are needed for Helix-internal builds, not for a consumer-facing smoke).

Locally verified: aspire new aspire-empty + aspire restore both succeed against
this simpler config.

Co-authored-by: Copilot <[email protected]>
RootCommand.NonInteractiveOption is declared Recursive=true so it applies to all
subcommands. Adding it in the run_aspire helper covers both 'aspire new' and
'aspire restore' (and any future commands) and provides defense in depth against:
  * future prompts added without a matching suppression flag (would now fail fast
    instead of silently defaulting or hanging on stdin)
  * ambient prompts like the certificate-trust check that appeared during local
    repro and isn't covered by the per-command --language / --suppress-agent-init /
    --localhost-tld flags.

The explicit suppression flags are kept for the known prompts so the chosen values
are deterministic regardless of what defaults the CLI picks under non-interactive.

Co-authored-by: Copilot <[email protected]>
1. eng/scripts/stabilization-smoke-init-restore.sh (CRITICAL fix):
   - run_aspire helper used to wrap its body in a subshell that did
     `cd $REPO_ROOT`, which overrode the caller's CWD on the way to the
     spawned aspire process. That meant aspire new --output was being
     resolved against the repo root (writing MyAspireApp/ into the repo
     working tree) and the NuGet.config walk found the repo's config
     instead of the temp-dir source-mapped one we carefully wrote.
   - Drop the inner cd, document why, and pass an absolute --output so
     CWD is irrelevant for path resolution. dotnet.sh resolves the local
     SDK via $scriptroot independently of CWD, so we don't lose SDK
     discovery.
   - Tighten the stable-feed sanity check to actually exclude prerelease
     suffixes (the previous bash glob matched -dev/-preview too).
   - Clarify in comments that today the smoke validates the SDK reference
     path only (aspire-empty resolves to single-file apphost.cs with no
     PackageReferences); per-integration restore coverage comes from the
     pack-time NU5104 check.

2. .github/workflows/ci.yml (medium):
   - Add --no-build --no-restore to the Aspire.Cli.Tests step so it
     consumes the previous pack step's build outputs instead of doing a
     differently-fingerprinted rebuild. The previous step already builds
     test projects (SkipTestProjects=false) under StabilizePackageVersion=true,
     so the assemblies are present.

3. tests/Shared/RepoTesting/Aspire.RepoTesting.targets (hardening):
   - Add an Error after the FindInList that pulls Aspire.AppHost.Sdk so a
     rename/un-pack of that project fails clearly here instead of
     surfacing as an opaque NuGet "Sdk Version=\"\"" error downstream.

4. src/Directory.Build.targets (hardening):
   - Document that ReturnPackageVersion reads $(PackageVersion) declaratively
     so a future Arcade bump that moves PackageVersion into a target body
     would be flagged.

Also picked up 10 commits worth of main via rebase (DCP 0.24.3 etc.).

Co-authored-by: Copilot <[email protected]>
@joperezr
Jose Perez Rodriguez (joperezr) force-pushed the joperezr/dummy-validate-stabilization-on branch from f0f0550 to d4f3a8e Compare May 20, 2026 21:04
SDK 10 dotnet test driver requires its own restore-equivalent evaluation pass to
detect the Microsoft.Testing.Platform runner. With --no-restore it falls back to
VSTest detection and exits non-zero because global.json mandates MTP.

The fingerprint-stability concern the previous comment raised is real but the cure
(skipping restore) is worse than the disease. Document why we deliberately let
dotnet test re-restore.

Co-authored-by: Copilot <[email protected]>
…soft#15681

Throwaway validation PR: exercises CI by flipping the single knob that

the changes in microsoft#15681 claim should be the only edit required to stabilize

a release. No other files should change.

Co-authored-by: Copilot <[email protected]>
@joperezr
Jose Perez Rodriguez (joperezr) force-pushed the joperezr/dummy-validate-stabilization-on branch from d4f3a8e to 0803073 Compare May 20, 2026 21:44
@joperezr

Copy link
Copy Markdown
Member Author

Experiment succeeded — empirically validated that stabilization is a single-line change on top of #15681. Stabilization Check passed, all Helix lanes that historically broke under stabilization (Hosting.Kubernetes, Hosting.Azure.Kubernetes, Polyglot SDK Validation: Rust/Go/Java/Python/TypeScript) stayed green with no special-case skips. Closing without merging as planned.

@joperezr
Jose Perez Rodriguez (joperezr) deleted the joperezr/dummy-validate-stabilization-on branch May 20, 2026 22:01
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 20, 2026
Jose Perez Rodriguez (joperezr) added a commit to joperezr/aspire that referenced this pull request May 21, 2026
Two issues found via the dummy validation PR (microsoft#17320) CI run:

1. SDK 10.0.x dotnet test requires --project <path>, not a positional project arg.
2. --no-build caused MTP to report 'Zero tests ran' even when the assembly
   was built in the previous step. Dropping it lets dotnet test handle the
   build itself (no-op when nothing changed, as is the case here).

Co-authored-by: Copilot <[email protected]>
Jose Perez Rodriguez (joperezr) added a commit to joperezr/aspire that referenced this pull request May 21, 2026
Two issues found via the dummy validation PR (microsoft#17320) CI run:

1. SDK 10.0.x dotnet test requires --project <path>, not a positional project arg.
2. --no-build caused MTP to report 'Zero tests ran' even when the assembly
   was built in the previous step. Dropping it lets dotnet test handle the
   build itself (no-op when nothing changed, as is the case here).

Co-authored-by: Copilot <[email protected]>
Jose Perez Rodriguez (joperezr) added a commit that referenced this pull request May 21, 2026
…for Helix testing (#15681)

* Add dynamic package version computation for Helix testing and update SDK version references

* Document where $(AspireAppHostSdkVersion) comes from on SDK Imports

Co-authored-by: Copilot <[email protected]>

* PR builds stay prerelease + stabilization gate on PRs

Issue #15335 / fixes the manual workaround pile that 13.1, 13.2, 13.3 stabilization PRs
had to maintain.

PR ci.yml: pass /p:DotNetFinalVersionKind=prerelease alongside the existing
/p:VersionSuffix=pr.NNNNN.gSHA so PR builds keep producing unique prerelease versions
even when StabilizePackageVersion=true is flipped on a release branch. Together with
the dynamic Helix package-version computation in this PR, that removes the need to
manually strip the compute_version_suffix step at stabilization time.

stabilization_check job: a new PR-only gate that runs ./build.sh -pack with
StabilizePackageVersion=true, runs the version/channel/template-pinning subset of
Aspire.Cli.Tests under that build, and runs an aspire init + aspire restore smoke
against the locally-built stable feed. Catches NU5104 (stable depends on preview)
and the restore-time failures that historically forced 13.x stabilization PRs to
hand-skip whole test classes. Job is wired into results: needs so branch protection
enforces it from day one; on push events the job runs but no-ops so the results:
contains(needs.*.result, ''skipped'') check doesn''t fire.

The smoke script lives at eng/scripts/stabilization-smoke-init-restore.sh and is
runnable locally for repro (see prerequisites at the top of the script).

Co-authored-by: Copilot <[email protected]>

* Remove internal PR/issue refs from committed CI/script comments

Comments describe what the code does, not which PR/issue they were authored under.

Co-authored-by: Copilot <[email protected]>

* Rewrite smoke script header to describe the canonical stable->preview NU5104 scenario

Co-authored-by: Copilot <[email protected]>

* Make stabilization smoke script configurable via env vars

STABILIZATION_SMOKE_CONFIGURATION (default: Debug) and STABILIZATION_SMOKE_FEED
(default: artifacts/packages/<config>/Shipping) let local users point the smoke at
a Release-config pack or a custom feed path without editing the script.

Co-authored-by: Copilot <[email protected]>

* Switch smoke from aspire init to aspire new aspire-empty

Exercises the user-visible 'create a project' flow, the templates package, and
template version-pinning end-to-end. Uses a source-mapped NuGet.config so Aspire.*
packages are pinned to the local stable feed (so a missing or preview-only Aspire dep
fails restore here) while non-Aspire transitives flow from the public dotnet feeds.

Verification accepts either single-file (apphost.cs) or project-based (.AppHost.csproj)
layout, since the CLI's template-resolution may map aspire-empty to either shape over time.

Co-authored-by: Copilot <[email protected]>

* Fix dotnet test invocation in stabilization_check job

Two issues found via the dummy validation PR (#17320) CI run:

1. SDK 10.0.x dotnet test requires --project <path>, not a positional project arg.
2. --no-build caused MTP to report 'Zero tests ran' even when the assembly
   was built in the previous step. Dropping it lets dotnet test handle the
   build itself (no-op when nothing changed, as is the case here).

Co-authored-by: Copilot <[email protected]>

* Simplify smoke NuGet.config to local-stable + nuget.org

aspire end-users only configure nuget.org by default — the smoke should match
that shape. Drops the dotnet-public / dotnet-eng / dotnet9 / dotnet10 internal
mirrors that were copied from tests/Shared/nuget-with-package-source-mapping.config
(those are needed for Helix-internal builds, not for a consumer-facing smoke).

Locally verified: aspire new aspire-empty + aspire restore both succeed against
this simpler config.

Co-authored-by: Copilot <[email protected]>

* Add --non-interactive to all CLI invocations in stabilization smoke

RootCommand.NonInteractiveOption is declared Recursive=true so it applies to all
subcommands. Adding it in the run_aspire helper covers both 'aspire new' and
'aspire restore' (and any future commands) and provides defense in depth against:
  * future prompts added without a matching suppression flag (would now fail fast
    instead of silently defaulting or hanging on stdin)
  * ambient prompts like the certificate-trust check that appeared during local
    repro and isn't covered by the per-command --language / --suppress-agent-init /
    --localhost-tld flags.

The explicit suppression flags are kept for the known prompts so the chosen values
are deterministic regardless of what defaults the CLI picks under non-interactive.

Co-authored-by: Copilot <[email protected]>

* Address rubber-duck review findings

1. eng/scripts/stabilization-smoke-init-restore.sh (CRITICAL fix):
   - run_aspire helper used to wrap its body in a subshell that did
     `cd $REPO_ROOT`, which overrode the caller's CWD on the way to the
     spawned aspire process. That meant aspire new --output was being
     resolved against the repo root (writing MyAspireApp/ into the repo
     working tree) and the NuGet.config walk found the repo's config
     instead of the temp-dir source-mapped one we carefully wrote.
   - Drop the inner cd, document why, and pass an absolute --output so
     CWD is irrelevant for path resolution. dotnet.sh resolves the local
     SDK via $scriptroot independently of CWD, so we don't lose SDK
     discovery.
   - Tighten the stable-feed sanity check to actually exclude prerelease
     suffixes (the previous bash glob matched -dev/-preview too).
   - Clarify in comments that today the smoke validates the SDK reference
     path only (aspire-empty resolves to single-file apphost.cs with no
     PackageReferences); per-integration restore coverage comes from the
     pack-time NU5104 check.

2. .github/workflows/ci.yml (medium):
   - Add --no-build --no-restore to the Aspire.Cli.Tests step so it
     consumes the previous pack step's build outputs instead of doing a
     differently-fingerprinted rebuild. The previous step already builds
     test projects (SkipTestProjects=false) under StabilizePackageVersion=true,
     so the assemblies are present.

3. tests/Shared/RepoTesting/Aspire.RepoTesting.targets (hardening):
   - Add an Error after the FindInList that pulls Aspire.AppHost.Sdk so a
     rename/un-pack of that project fails clearly here instead of
     surfacing as an opaque NuGet "Sdk Version=\"\"" error downstream.

4. src/Directory.Build.targets (hardening):
   - Document that ReturnPackageVersion reads $(PackageVersion) declaratively
     so a future Arcade bump that moves PackageVersion into a target body
     would be flagged.

Also picked up 10 commits worth of main via rebase (DCP 0.24.3 etc.).

Co-authored-by: Copilot <[email protected]>

* Revert --no-build --no-restore on Aspire.Cli.Tests step

SDK 10 dotnet test driver requires its own restore-equivalent evaluation pass to
detect the Microsoft.Testing.Platform runner. With --no-restore it falls back to
VSTest detection and exits non-zero because global.json mandates MTP.

The fingerprint-stability concern the previous comment raised is real but the cure
(skipping restore) is worse than the disease. Document why we deliberately let
dotnet test re-restore.

Co-authored-by: Copilot <[email protected]>

* Reuse existing GetPackageName target instead of new ReturnPackageVersion

Radical pointed out my new target name (ReturnPackageVersion) clashed
with one already in src/Aspire.Dashboard/Aspire.Dashboard.csproj that has
a different signature (Returns="$(PackageVersion)" string vs my item-shape).

It turns out src/Directory.Build.targets already has a GetPackageName
target with literally the exact shape I needed — Returns="@(PackageName)"
with PackageId as Include and PackageVersion as WithPackageVersion
metadata, gated on IsPackable=true. It is already used by
tests/Shared/Aspire.Templates.Testing.targets.

Switched the Helix versions generator to call GetPackageName instead of
adding a new target, and dropped my ReturnPackageVersion target.
Side-benefits:
- No name clash with Aspire.Dashboard.Aspire.Dashboard.csproj (which keeps
  its local ReturnPackageVersion intended for eng/Publishing.props blob
  publishing — different shape, different purpose).
- One target instead of two doing nearly the same thing.
- Reuses an already-established convention rather than introducing
  a parallel one.

Validated end-to-end by triggering _GeneratePackagesVersionsProps on
Aspire.Cli.Tests; the generated Directory.Packages.Versions.props has
the right entries (Aspire.AppHost.Sdk, Aspire.Hosting.Foundry et al with
correct stable/preview semantics, plus AspireAppHostSdkVersion property).

Co-authored-by: Copilot <[email protected]>

* Pin & verify exact SDK version in stabilization smoke

Derive the Aspire.AppHost.Sdk version directly from the local feed
(Aspire.AppHost.Sdk.<X>.nupkg filename), pass that exact version via
`aspire new --version <X>`, then assert the generated apphost.cs
contains `#:sdk Aspire.AppHost.Sdk@<X>` before running restore.

Catches the failure mode where the CLI's template-version resolution
silently picks a different SDK version than the one we just packed —
without this assertion that would surface much later as a confusing
"package not found in local-stable feed" restore error instead of a
clear "wrong SDK version emitted in AppHost."

Also covers the project-based AppHost template shape (Sdk="Aspire.AppHost.Sdk/<X>"
in .csproj) for the day the aspire-empty template flips back to multi-project.

Co-authored-by: Copilot <[email protected]>

* Address Copilot review: tighten stable-feed guard + fix job comment

1. Stable-nupkg sanity check: switch from a "filter out known prerelease
   suffix labels" allowlist (which missed -rc1 / -alpha2 / etc. because
   they have no dot between the label and digits) to "match only
   Aspire.Hosting.MAJOR.MINOR.PATCH.nupkg exactly". Any SemVer prerelease
   shape (-dev., -preview.X.Y., -rc1, -rc.1, -alpha, etc.) now fails the
   check, matching the intent.

2. Apply the same stable-only pattern to the Aspire.ProjectTemplates check
   (was only verifying any version-shaped name existed).

3. Fix the stabilization_check job comment in ci.yml: said the script runs
   `aspire init -> aspire restore`, but it actually runs `aspire new
   aspire-empty -> aspire restore` (and has done since b96c436). Updated
   to match what the script actually does.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant