Skip to content

Add AKS Blazor+Redis interactive deploy E2E test#16316

Merged
mitchdenny merged 9 commits intomainfrom
deploy-test/aks-blazor-redis
Apr 21, 2026
Merged

Add AKS Blazor+Redis interactive deploy E2E test#16316
mitchdenny merged 9 commits intomainfrom
deploy-test/aks-blazor-redis

Conversation

@mitchdenny
Copy link
Copy Markdown
Member

Description

Add a new AKS deployment E2E test that uses the interactive aspire deploy pipeline flow (instead of the manual aspire publish + helm install approach).

What's new

  • AksBlazorRedisDeploymentTests.cs — Deploys a Blazor (Starter) template with Redis cache to AKS using aspire deploy with interactive parameter prompts. The test:
    • Creates a project via aspire new interactive prompts (Blazor + Redis)
    • Modifies AppHost.cs to add AddContainerRegistry + AddKubernetesEnvironment with Helm config
    • Deploys via aspire deploy answering parameter prompts (registryendpoint, namespace, chartversion)
    • Verifies all endpoints including /weather which exercises the full Redis cache pipeline
    • Cleans up via aspire destroy + resource group deletion

Rename

  • AksStarterWithRedisDeploymentTests.csAksStarterWithRedisHelmDeploymentTests.cs — renamed to disambiguate from the new interactive deploy test (this existing test uses the manual Helm chart approach)

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings April 20, 2026 00:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

🚀 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 -- 16316

Or

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 AksBlazorRedisDeploymentTests to provision AKS+ACR, scaffold a Blazor+Redis app, inject Kubernetes/registry configuration into AppHost, deploy via interactive aspire 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);
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
var registry = builder.AddContainerRegistry("registry", registryEndpoint);
_ = builder.AddContainerRegistry("registry", registryEndpoint);

Copilot uses AI. Check for mistakes.
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 20, 2026 01:30 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 20, 2026 01:30 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 20, 2026 01:30 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 20, 2026 01:30 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 20, 2026 01:30 Inactive
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

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).

Comment thread tests/Aspire.Deployment.EndToEnd.Tests/AksBlazorRedisDeploymentTests.cs Outdated
Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Merge once comments investigated

mitchdenny and others added 9 commits April 21, 2026 15:17
- 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>
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16316...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 72 recordings uploaded (commit 17ac848)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View Recording
DoListStepsShowsPipelineSteps ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
OtelLogsReturnsStructuredLogsFromStarterApp ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24705584175

@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests passed — 28 passed, 0 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-FrontDoorDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisHelmDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksBlazorRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

No documentation PR is required for this change.

Reason: This PR contains only test-only changes — a new E2E test class (AksBlazorRedisDeploymentTests.cs) and a rename of an existing test class (AksStarterWithRedisDeploymentTests.csAksStarterWithRedisHelmDeploymentTests.cs). There are no new public APIs, user-facing features, configuration options, or behavioral changes that would require documentation updates.

Generated by PR Documentation Check for issue #16316 · ● 129K ·

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants