Add AKS Blazor+Redis interactive deploy E2E test#16316
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16316Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16316" |
There was a problem hiding this comment.
Pull request overview
Adds a new AKS deployment end-to-end test that exercises the interactive aspire deploy flow (including answering deploy-time parameter prompts) for a Blazor + Redis template, and clarifies naming for the existing Helm-based AKS Redis test.
Changes:
- Added
AksBlazorRedisDeploymentTeststo provision AKS+ACR, scaffold a Blazor+Redis app, inject Kubernetes/registry configuration into AppHost, deploy via interactiveaspire deploy, and verify endpoints. - Renamed the existing AKS Starter + Redis test class to explicitly indicate it uses the manual Helm (
aspire publish+helm install) workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Aspire.Deployment.EndToEnd.Tests/AksStarterWithRedisHelmDeploymentTests.cs | Updates class name and summary docs to disambiguate the Helm-based approach. |
| tests/Aspire.Deployment.EndToEnd.Tests/AksBlazorRedisDeploymentTests.cs | New interactive AKS deploy E2E test for Blazor + Redis, including infra provisioning, deploy, verification, and cleanup. |
| var buildRunPattern = "builder.Build().Run();"; | ||
| var replacement = """ | ||
| var registryEndpoint = builder.AddParameter("registryendpoint"); | ||
| var registry = builder.AddContainerRegistry("registry", registryEndpoint); |
There was a problem hiding this comment.
The AppHost.cs snippet being injected declares registry but never uses it. This will introduce an unused-variable compiler warning in the generated AppHost project, and could break the deploy if that project treats warnings as errors. Consider discarding the return value (or using it in a .WithContainerRegistry(...) call if needed) to avoid the warning.
| var registry = builder.AddContainerRegistry("registry", registryEndpoint); | |
| _ = builder.AddContainerRegistry("registry", registryEndpoint); |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
JamesNK
left a comment
There was a problem hiding this comment.
Found 3 issues: 1 bug (silent test pass on verification failure), 1 resource leak (Process not disposed), 1 correctness issue (cleanup status reported unconditionally as success).
JamesNK
left a comment
There was a problem hiding this comment.
Merge once comments investigated
- Create AksBlazorRedisDeploymentTests.cs: deploys Blazor starter template with Redis to AKS using 'aspire deploy' interactive pipeline flow - Uses AddContainerRegistry + AddKubernetesEnvironment with Helm config - Provisions AKS/ACR infrastructure, deploys via aspire deploy with interactive parameter prompts, verifies endpoints via kubectl port-forward - Rename AksStarterWithRedisDeploymentTests -> AksStarterWithRedisHelmDeploymentTests to disambiguate from the new interactive deploy test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace manual AKS/ACR infrastructure provisioning with AddAzureKubernetesEnvironment which handles all provisioning automatically via the aspire deploy pipeline, matching the ACA deployment test pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configure both system and user node pools to use Standard_D2as_v4 (DASv4 family) and deploy to australiaeast region for SKU availability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Get AKS credentials, discover the Helm namespace, port-forward the webfrontend service, and verify both the root page and /weather endpoint (which exercises the full webfrontend -> apiservice -> Redis pipeline). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Helm deployment uses the 'default' namespace, so the previous grep -v default filtered it out, leaving NS empty. Now discover the namespace by finding the webfrontend-service directly via jsonpath. Also use WaitAsync instead of WaitForSuccessPromptAsync after the background port-forward job since the prompt appears immediately before the port-forward output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Redirect kubectl port-forward stdout/stderr to /dev/null to prevent 'Handling connection for 18081' and 'Forwarding from...' messages from interleaving with the terminal prompt. These background messages were corrupting the Hex1b prompt counter pattern, causing the test to hang waiting for a prompt that was already consumed. Also use proper WaitForSuccessPromptAsync after backgrounding the port-forward, and add an explicit sleep to let the tunnel establish. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use InstallCurrentBuildAspireCliAsync and WaitForAspireAddCompletionAsync from the shared helpers, matching the pattern established in PR #16298. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Curl retry loops now fail explicitly if all retries exhausted instead of silently passing - Add 'using' to Process in TriggerCleanupResourceGroup to fix resource leak - Move ReportCleanupStatus inside TriggerCleanupResourceGroup so it reports actual outcome instead of always reporting success Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16316... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
🎬 CLI E2E Test Recordings — 72 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24705584175 |
|
✅ Deployment E2E Tests passed — 28 passed, 0 failed, 0 cancelled View test results and recordings
|
|
No documentation PR is required for this change. Reason: This PR contains only test-only changes — a new E2E test class (
|
Description
Add a new AKS deployment E2E test that uses the interactive
aspire deploypipeline flow (instead of the manualaspire publish+helm installapproach).What's new
AksBlazorRedisDeploymentTests.cs— Deploys a Blazor (Starter) template with Redis cache to AKS usingaspire deploywith interactive parameter prompts. The test:aspire newinteractive prompts (Blazor + Redis)AddContainerRegistry+AddKubernetesEnvironmentwith Helm configaspire deployanswering parameter prompts (registryendpoint, namespace, chartversion)/weatherwhich exercises the full Redis cache pipelineaspire destroy+ resource group deletionRename
AksStarterWithRedisDeploymentTests.cs→AksStarterWithRedisHelmDeploymentTests.cs— renamed to disambiguate from the new interactive deploy test (this existing test uses the manual Helm chart approach)Checklist