Skip to content

Fix deployment E2E nightly failures#16072

Merged
mitchdenny merged 2 commits into
microsoft:mainfrom
ideepakchauhan7:fix-deployment-e2e-tests-16057
Apr 12, 2026
Merged

Fix deployment E2E nightly failures#16072
mitchdenny merged 2 commits into
microsoft:mainfrom
ideepakchauhan7:fix-deployment-e2e-tests-16057

Conversation

@ideepakchauhan7

@ideepakchauhan7 ideepakchauhan7 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This addresses the deployment E2E failures reported in #16057 from the April 11, 2026 nightly run.

The failing tests were all relying on outdated CI interaction assumptions:

  • Python deployment tests were sourcing only the CLI binary in CI instead of the full Aspire bundle required by Python apphost flows.
  • The TypeScript VNet SQL infra test still waited for a NuGet prompt that bundle-based installs no longer show.
  • The compact naming upgrade test now needs to dismiss the template-version prompt before continuing.
  • The managed Redis test matched the old output-path prompt text too strictly.

What Changed

  • Switched the Python deployment CI setup paths to install/source the full Aspire bundle when running in CI.
  • Updated the ACR purge task test so PR bundle installs do not re-handle the NuGet version prompt incorrectly.
  • Removed the obsolete prompt wait from the TypeScript VNet SQL infra test.
  • Updated the GA init flow in the compact naming upgrade test for the current CLI prompt sequence.
  • Relaxed the managed Redis prompt matcher to handle the updated CLI text.

Impact

These changes align the deployment E2E tests with the current CLI and bundle behavior so the nightly deployment workflow can complete without the false failures seen in #16057.

Fixes #16057

Validation

  • ./dotnet.sh build tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj -c Release
  • ./dotnet.sh test tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj -c Release with writable temp XDG paths and DOTNET_ROOT set to the repo-local SDK
  • Result: build passed; deployment E2E test assembly executed successfully in this environment with the touched tests loading and skipping because ASPIRE_DEPLOYMENT_TEST_SUBSCRIPTION is not configured

Remaining Environment Limits

  • Full Azure-backed deployment execution was not run here because this environment does not have the Azure deployment prerequisites configured (ASPIRE_DEPLOYMENT_TEST_SUBSCRIPTION, Azure auth/CLI, and usable Docker daemon access)

@github-actions

github-actions Bot commented Apr 11, 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 -- 16072

Or

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

@ideepakchauhan7 ideepakchauhan7 marked this pull request as ready for review April 11, 2026 18:17
Copilot AI review requested due to automatic review settings April 11, 2026 18:17

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

Updates the deployment E2E test suite to match current Aspire CLI bundle-based install and interactive prompt behavior, addressing recent nightly failures (issue #16057).

Changes:

  • Switch Python deployment tests to source the full Aspire bundle in CI (optionally installing the PR bundle when GITHUB_PR_NUMBER is set).
  • Adjust several E2E flows to reflect updated/removed CLI prompts (NuGet/version prompts, init prompt sequences, relaxed text matching).
  • Update ACR purge / compact naming upgrade / managed Redis prompt matching to avoid false failures.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Aspire.Deployment.EndToEnd.Tests/TypeScriptVnetSqlServerInfraDeploymentTests.cs Removes NuGet.config/init completion wait during aspire init and relies on agent-init/success prompt handling.
tests/Aspire.Deployment.EndToEnd.Tests/PythonFastApiDeploymentTests.cs In CI, uses bundle env (and installs PR bundle when applicable) to support Python apphost flows.
tests/Aspire.Deployment.EndToEnd.Tests/AppServicePythonDeploymentTests.cs Same bundle-based CI setup adjustment for Python App Service deployment flow.
tests/Aspire.Deployment.EndToEnd.Tests/AcrPurgeTaskDeploymentTests.cs Uses bundle env in CI and avoids handling the NuGet version prompt in PR bundle installs.
tests/Aspire.Deployment.EndToEnd.Tests/AcaManagedRedisDeploymentTests.cs Relaxes output-path prompt matcher to tolerate updated CLI text.
tests/Aspire.Deployment.EndToEnd.Tests/AcaCompactNamingUpgradeDeploymentTests.cs Updates GA init flow to dismiss additional prompts introduced in newer CLI sequences.

Comment on lines 92 to 96
// When using bundle install, the CLI auto-selects the package version
// from the local hive without showing a NuGet.config prompt.
// Go straight to waiting for the agent init prompt / success prompt.
await auto.DeclineAgentInitPromptAsync(counter);

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

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

By removing the optional NuGet/template-version prompt handling here, the test now assumes aspire init --language typescript always proceeds directly to the agent-init prompt/success prompt. If the CLI shows an intermediate prompt (e.g., NuGet.config/template version selection in some environments), DeclineAgentInitPromptAsync will never see the expected prompt and the test can hang. Consider restoring a conditional wait that accepts either (a) the intermediate prompt and dismisses it, or (b) the agent-init/success prompt, so both bundle and non-bundle/local runs stay reliable.

Copilot uses AI. Check for mistakes.
Comment on lines 103 to 105
// Wait for and dismiss the language selection (auto-selected or prompt)
await auto.WaitAsync(TimeSpan.FromSeconds(5));
await auto.EnterAsync();

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

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

The new WaitAsync(5s) + EnterAsync() is timing-based and can send input at the wrong time (or too early/late) if the language selection prompt is slower/faster, making this test flaky. Other E2E tests typically WaitUntilTextAsync("Which language would you like to use?") before sending Enter. Consider waiting for the actual prompt text (or for the success/agent-init prompt if it auto-selects) instead of sleeping.

Suggested change
// Wait for and dismiss the language selection (auto-selected or prompt)
await auto.WaitAsync(TimeSpan.FromSeconds(5));
await auto.EnterAsync();
// Wait for and dismiss the language selection when it is shown.
// Some CLI flows may auto-select the language and skip this prompt.
try
{
await auto.WaitUntilTextAsync("Which language would you like to use?", timeout: TimeSpan.FromSeconds(30));
await auto.EnterAsync();
}
catch
{
// Continue when the language prompt is auto-skipped.
}

Copilot uses AI. Check for mistakes.
Comment on lines 106 to 109
// The CLI may show a "Select a template version" prompt — dismiss it
await auto.WaitUntilTextAsync("based on NuGet.config", timeout: TimeSpan.FromSeconds(60));
await auto.EnterAsync();
await auto.DeclineAgentInitPromptAsync(counter);

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

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

This step is described as a prompt that "may" appear, but the code unconditionally waits for based on NuGet.config and presses Enter. If the CLI auto-selects a template version (no prompt), this will time out and fail/hang. Consider waiting for either the version prompt OR the next expected prompt (agent-init or shell success prompt), and only sending Enter when the version prompt is actually present.

Copilot uses AI. Check for mistakes.
@ideepakchauhan7

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@mitchdenny

Copy link
Copy Markdown
Member

Thanks for fixing these @ideepakchauhan7! We independently hit the same issues while adding new AKS deployment tests and arrived at nearly identical fixes. Merging this now. 🙏

@mitchdenny mitchdenny enabled auto-merge (squash) April 12, 2026 06:44

@mitchdenny mitchdenny 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 — reviewed for correctness and security. The changes align the deployment E2E tests with current CLI/bundle behavior. No security concerns (test-only changes, no credential exposure, integer-validated PR numbers in shell commands).

@davidfowl

Copy link
Copy Markdown
Contributor

@mitchdenny we should run the deployment tests to make sure they pass

@mitchdenny

Copy link
Copy Markdown
Member

Closing in favor of #16086 which has the same changes from an internal branch (needed for CI checks to run). Thank you @ideepakchauhan7!

@mitchdenny mitchdenny closed this Apr 12, 2026
auto-merge was automatically disabled April 12, 2026 07:24

Pull request was closed

@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 12, 2026 07:58 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 12, 2026 07:58 Failure
@mitchdenny mitchdenny reopened this Apr 12, 2026
@mitchdenny mitchdenny merged commit 91da4a0 into microsoft:main Apr 12, 2026
1422 of 1439 checks passed
@joperezr joperezr added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 14, 2026
* Fix deployment E2E tests for issue 16057

* Handle optional init prompts in deployment tests
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 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.

[Deployment E2E] Nightly test failure - 2026-04-11

5 participants