Skip to content

[release/17.0] Fix self-update channel persistence test - #22196

Merged
Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
joperezr-release-self-update-investigation
Nov 13, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
joperezr-release-self-update-investigation

Conversation

@joperezr

Copy link
Copy Markdown
Member

Description

Fix the self-update E2E failure exposed when the shared staging download advanced from 13.6.5 to 17.0.0. The test expected an implicit C# project update to write channel: staging, but #19763 intentionally made unqualified C# updates preserve native NuGet policy and the project's existing channel. The self-update itself succeeds.

Test the install identity contract directly instead:

  • Start with a script-style install whose sidecar selects stable, then self-update explicitly to staging.
  • Verify that the sidecar persists staging, preserves the install source, package override, and an unknown field, and removes the old binary's version and commit.
  • Relaunch the downloaded CLI and check its effective staging identity notice, with environment overrides cleared.

Remove the unrelated AppHost scaffolding and project-update assertion. A same-version replacement is valid: channel persistence must work even when the downloaded executable has exactly the same version and commit. No product behavior changes or test quarantine.

The post-update invocation still exercises the externally published staging CLI; the sidecar assertions cover the current-source writer independently of the downloaded binary's built-in channel.

Validation

Passed:

dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-restore -v minimal

Result: build succeeded with zero warnings and zero errors.

Ran the exact corrected test in Linux Docker using the built test assembly:

dotnet artifacts/bin/Aspire.Cli.EndToEnd.Tests/Debug/net10.0/Aspire.Cli.EndToEnd.Tests.dll --filter-method '*.SelfUpdateToStaging_PersistsChannelForRelaunchedCli' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'

Both install configurations passed, one test each with no skips:

  • ASPIRE_E2E_CLI_ARCHIVE_DIR: the existing release PR [release/17.0] Combined dashboard backports (#22125–#22132) #22186 archive, 17.0.0-pr.22186.g5ef1dd77, self-updating to live staging.
  • ASPIRE_E2E_ARCHIVE: a local hive containing the live staging binary and its matching hosting package. The recording confirms both the installed and downloaded CLI are 17.0.0+54aa0979d8fb019607f95712803f108ff2da1432, while the persisted channel changes from stable to staging.

The local Linux validation image supplied the existing installer scripts, .NET 10, Docker CLI, and jq.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Verify persisted install identity directly instead of expecting an implicit C# project update to switch channels. Preserve same-version self-update coverage.

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

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 -- 22196

Or

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

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

1 / 101 PR test projects · 0 PR jobs, from 1 changed file.

Selected PR test projects (1 / 101)

Aspire.Cli.EndToEnd.Tests

Selected PR jobs (0)

none


How these were chosen — grouped by what changed

🧪 tests/Aspire.Cli.EndToEnd.Tests/SelfUpdateChannelPersistenceTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

Job reasons

none


Selection computed for commit 3aca75d.

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.

🟢 Approval recommended

No active review issues remain in the test-only update to self-update identity coverage.

No open issues 🎉

What changed in this PR

Updates the CLI self-update end-to-end test to verify persisted install identity directly, replacing a project-update expectation invalidated by #19763. No product behavior changes.

Changes:

  • Removes AppHost scaffolding and the implicit C# project-update assertion.
  • Verifies that self-update persists staging, preserves source, package override, and unknown metadata, and removes stale version and commit fields.
  • Clears identity environment overrides and checks the relaunched CLI’s effective staging identity, including same-version replacements.
File Description
tests/​Aspire.Cli.EndToEnd.Tests/​SelfUpdateChannelPersistenceTests.cs Refocuses self-update coverage on sidecar persistence and relaunched CLI identity.

Review effort: Balanced

@joperezr
Jose Perez Rodriguez (joperezr) merged commit 98fe642 into release/17.0 Nov 13, 2026
167 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 13, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

excluded → base_branch_is_release, title_release_prefix (backport PR with [release/17.0] title). Triggered signals: pr_body_has_cli_flag_mention (the evidence is only a dotnet build ... --no-restore command in the PR body, a false positive). All changes are test-only (only_test_or_build_changes), so no docs are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants