Repository navigation
[release/17.0] Stabilize CLI update E2E tests - #22409
Jose Perez Rodriguez (joperezr) merged 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22409Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22409" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
The success marker’s trailing space cannot match the trimmed idle prompt, causing the initial wait to time out after a successful aspire update when no self-update question appears.
1 open issue
What changed in this PR
This test-only PR aims to stabilize CLI update end-to-end tests on release/17.0, without changing product behavior.
Changes:
- Makes configuration-source adoption assertions independent of JSON property order and aligns the expected SDK version with the AppHost.
- Adds a shared completion helper to handle optional CLI self-update prompts in package-management and channel-update tests.
- Corrects comments about which update prompts the notification setting controls.
| File | Description |
|---|---|
| tests/Aspire.Cli.EndToEnd.Tests/Helpers/ConfigSourceTestContext.cs | Specifies the NuGet config directory and updates configuration assertions. |
| tests/Aspire.Cli.EndToEnd.Tests/Helpers/CliE2EAutomatorHelpers.cs | Adds update-completion handling for success, failure, and self-update prompts. |
| tests/Aspire.Cli.EndToEnd.Tests/ChannelUpdateWorkflowTests.cs | Uses the completion helper and corrects notification comments. |
| tests/Aspire.Cli.EndToEnd.Tests/CentralPackageManagementTests.cs | Uses the completion helper across update scenarios and corrects comments. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
Terminal timing and screen scoping across repeated updates remain unverified because the affected Linux/Docker E2E tests were not run locally and no passing CI results were provided.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Port the ConfigSource E2E test fix from #22182 so brownfield source adoption no longer assumes a fixed SDK version or JSON property order. Add WaitForAspireUpdateCompletionAsync, which waits for the aspire update command to finish and declines the optional post-update CLI self-update confirmation when it appears. features.updateNotificationsEnabled does not gate that prompt, so CentralPackageManagementTests and the ChannelUpdateWorkflowTests stable-preview flow must handle both cases. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
a997662 to
558e1e5
Compare
Tests selector1 / 101 PR test projects · 0 PR jobs, from 4 changed files. Selected PR test projects (1 / 101)
Selected PR jobs (0)none How these were chosen — grouped by what changed🧪 🧪 🧪 🧪 Job reasonsnone Selection computed for commit |
fe043aa
into
release/17.0

Description
Test-only change for
release/17.0. It fixes CLI E2E failures that show up on unrelated release PRs (for example #22401 and #22362). There are no product changes.1. ConfigSource brownfield adoption test. This ports only the
ConfigSourceTestContexttest fix from #22182, which is already merged onmainand is also part of the open backport #22219.Update_AcceptingConfigurationSourceUpdatesBrownfieldConfigurationassumed the old SDK version and an exact JSON property order. With this change, the test:aspire update --yes --nuget-config-dir .sdk.versionfrom the AppHostJsonNode.DeepEquals2. Post-update CLI self-update prompt. After the project update,
aspire updatemay askAn update is available for the Aspire CLI. Would you like to update it now? [Y/n].features.updateNotificationsEnableddoes not control this prompt. It appears only when a newer CLI has been published on the selected channel. Four tests blocked on it until they timed out:CentralPackageManagementTests.AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesPropsCentralPackageManagementTests.AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrentChannelUpdateWorkflowTests.UpdateToStable_TypeScriptSingleFileInit_KeepsConfigChannelChannelUpdateWorkflowTests.UpdateToStable_TypeScript_PreviewsStablePkgsAndKeepsChannelThe new
CliE2EAutomatorHelpers.WaitForAspireUpdateCompletionAsynchelper waits until one of three things appears for the currentSequenceCountervalue:Only output after the line where the command was typed is considered, so a prompt left on screen by an earlier
aspire updatein the same test does not count. When the CLI self-update prompt appears, the helper typesnwithout Enter, so no phantom shell command desyncs the counter, and then waits for the success prompt. It does not press Enter blindly or use fixed delays, and it works whether or not the prompt appears. The comments that claimedupdateNotificationsEnabledsuppresses this prompt have been corrected.Validation
MSBUILDTERMINALLOGGER=false dotnet build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj -v q -nologosucceeded with 0 warnings and 0 errors.[Y/n]prompt.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?