Skip to content

Add AKS deployment tests using aspire deploy pipeline (C# + TypeScript)#16077

Open
mitchdenny wants to merge 5 commits intomainfrom
deploy-test/aks-aspire-deploy
Open

Add AKS deployment tests using aspire deploy pipeline (C# + TypeScript)#16077
mitchdenny wants to merge 5 commits intomainfrom
deploy-test/aks-aspire-deploy

Conversation

@mitchdenny
Copy link
Copy Markdown
Member

@mitchdenny mitchdenny commented Apr 12, 2026

Description

Adds two new E2E deployment tests that deploy Aspire applications to Azure Kubernetes Service using the full aspire deploy pipeline.

Motivation: We recently merged end-to-end aspire deploy support for Kubernetes (#15723). The existing AksStarterDeploymentTests uses the manual workflow (aspire publishdotnet publish /t:PublishContainerhelm install). These new tests validate that the integrated aspire deploy pipeline works end-to-end against a real AKS cluster for both C# and TypeScript AppHosts.

AksDeployStarterDeploymentTests (C# AppHost)

  • Creates Aspire starter template with AddContainerRegistry + AddKubernetesEnvironment with Helm
  • Runs aspire deploy which automatically builds images, pushes to ACR, generates Helm charts, and deploys
  • Verifies apiservice and webfrontend endpoints via kubectl port-forward

AksDeployTypeScriptDeploymentTests (TypeScript AppHost)

  • Creates Express/React project, adds Aspire.Hosting.Kubernetes, runs aspire restore for TypeScript SDK
  • Modifies apphost.ts with addContainerRegistry + addKubernetesEnvironment with Helm
  • Runs aspire deploy and verifies the bundled app service endpoint via kubectl port-forward

Also adds a reusable AspireDeployInteractiveAsync helper to DeploymentE2EAutomatorHelpers.

Validated by: Both tests pass in CI via /deployment-test on this PR.

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 12, 2026 02:29
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 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 -- 16077

Or

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

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16077...

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

View workflow run

{
var (promptText, value) = parameterResponses[i];

await auto.WaitUntilTextAsync(promptText, timeout: TimeSpan.FromMinutes(5));
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.

5 mins??

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 end-to-end deployment test that validates the full aspire deploy Kubernetes/Helm pipeline (build → push → chart gen → deploy) against real Azure infrastructure, and introduces a small terminal-automation helper to drive interactive aspire deploy parameter prompts.

Changes:

  • Added AksDeployStarterDeploymentTests E2E test that provisions AKS+ACR, deploys the Aspire starter via aspire deploy, verifies endpoints, and cleans up resources.
  • Added AspireDeployInteractiveAsync terminal automator helper for answering interactive deploy parameter prompts and waiting for pipeline completion.

Reviewed changes

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

File Description
tests/Aspire.Deployment.EndToEnd.Tests/Helpers/DeploymentE2EAutomatorHelpers.cs Adds reusable terminal automation helper to run aspire deploy interactively in deployment E2E tests.
tests/Aspire.Deployment.EndToEnd.Tests/AksDeployStarterDeploymentTests.cs New AKS E2E test that exercises the integrated aspire deploy pipeline end-to-end and validates deployed services.

}

// Wait for pipeline completion
await auto.WaitUntilTextAsync("PIPELINE SUCCEEDED", timeout: timeout);
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

In this reusable helper, waiting only for "PIPELINE SUCCEEDED" means a failed deploy will typically burn the full timeout before surfacing, making failures slower and harder to diagnose. Consider waiting for either "PIPELINE SUCCEEDED" or "PIPELINE FAILED" and throwing immediately when the failed marker is observed (similar to other deployment E2E tests).

Suggested change
await auto.WaitUntilTextAsync("PIPELINE SUCCEEDED", timeout: timeout);
var pipelineSucceededPattern = new CellPatternSearcher().Find("PIPELINE SUCCEEDED");
var pipelineFailedPattern = new CellPatternSearcher().Find("PIPELINE FAILED");
var pipelineFailed = false;
await auto.WaitUntilAsync(
s =>
{
if (pipelineFailedPattern.Search(s).Count > 0)
{
pipelineFailed = true;
return true;
}
return pipelineSucceededPattern.Search(s).Count > 0;
},
timeout: timeout,
description: "pipeline completion");
if (pipelineFailed)
{
throw new InvalidOperationException("Deployment pipeline failed.");
}

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +132
/// <summary>
/// Runs <c>aspire deploy</c> interactively, answering parameter prompts via terminal automation.
/// The deploy pipeline handles image building, pushing, Helm chart generation, and deployment.
/// </summary>
/// <param name="auto">The terminal automator.</param>
/// <param name="counter">Sequence counter for prompt tracking.</param>
/// <param name="parameterResponses">
/// Ordered list of (promptSubstring, valueToType) tuples.
/// Each entry matches by the parameter name appearing in the prompt text.
/// Entries are consumed in order — first match wins.
/// </param>
/// <param name="pipelineTimeout">Timeout for the entire deploy pipeline. Defaults to 15 minutes.</param>
internal static async Task AspireDeployInteractiveAsync(
this Hex1bTerminalAutomator auto,
SequenceCounter counter,
IReadOnlyList<(string PromptText, string Value)> parameterResponses,
TimeSpan? pipelineTimeout = null)
{
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

This method largely duplicates AspireDeployInteractiveAsync already present in tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesDeployTestHelpers.cs. If both projects need the same behavior, consider moving the shared implementation to tests/Shared (or another common helper) to avoid future drift (e.g., prompt handling, failure detection, timeouts).

Copilot uses AI. Check for mistakes.
Comment on lines +206 to +216
// Configure container registry for image push
var registryEndpoint = builder.AddParameter("registryendpoint");
var registry = builder.AddContainerRegistry("registry", registryEndpoint);

// Add Kubernetes environment with Helm deployment
builder.AddKubernetesEnvironment("k8s")
.WithHelm(helm =>
{
helm.WithNamespace(builder.AddParameter("namespace"));
helm.WithChartVersion(builder.AddParameter("chartversion"));
});
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The injected AppHost.cs snippet declares var registry = builder.AddContainerRegistry(...) but never uses registry. If the generated template/project treats warnings as errors, this unused local could break the deploy build. Consider either dropping the assignment (just call AddContainerRegistry without storing the result) or using the registry (e.g., via .WithContainerRegistry(registry) where appropriate).

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 02:36 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 02:36 Inactive
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16077...

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

View workflow run

@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 03:42 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 03:42 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 03:42 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 03:42 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 03:42 Inactive
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16077...

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

View workflow run

@github-actions
Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16077...

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

View workflow run

mitchdenny and others added 2 commits April 12, 2026 19:19
Add two new E2E deployment tests that deploy Aspire applications to Azure
Kubernetes Service using the full 'aspire deploy' pipeline instead of the
manual 'aspire publish' + helm install workflow.

AksDeployStarterDeploymentTests (C# AppHost):
- Deploys the standard Aspire starter template to AKS
- Uses AddContainerRegistry + AddKubernetesEnvironment with Helm
- Verifies apiservice and webfrontend endpoints via port-forward

AksDeployTypeScriptDeploymentTests (TypeScript AppHost):
- Deploys the Express/React starter template to AKS
- Modifies apphost.ts with addContainerRegistry + addKubernetesEnvironment
- Runs aspire restore to regenerate TypeScript SDK with K8s types
- Verifies the bundled app service endpoint via port-forward

Both tests exercise the end-to-end aspire deploy flow for Kubernetes:
provision AKS + ACR, create project, run 'aspire deploy' (which builds
images, pushes to ACR, generates Helm charts, and deploys), then verify
services respond.

Also adds a reusable AspireDeployInteractiveAsync helper to
DeploymentE2EAutomatorHelpers for future deployment tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix all deployment E2E test failures caused by CLI/bundle behavior drift:

Bundle install (3 tests): PythonFastApi, AppServicePython, AcrPurgeTask
were only sourcing the CLI binary but Python templates need the full
bundle with AppHost server. Switched to InstallAspireBundleFromPullRequestAsync
+ SourceAspireBundleEnvironmentAsync.

NuGet prompt (3 tests): TypeScriptExpress, TypeScriptVnetSqlServer,
AcrPurgeTask waited for '(based on NuGet.config)' after aspire add, but
bundle-based installs don't show this prompt. Added PR number guard or
removed the wait entirely.

Init flow (2 tests): AcaCompactNamingUpgrade and TypeScriptVnetSqlServer
used hardcoded init prompt expectations that no longer match the CLI.
Replaced with a flexible state machine that handles language selection,
template version, agent init, and success prompts in any order.

Output path prompt (1 test): AcaManagedRedis matched 'Enter the output
path:' with trailing colon but the CLI text changed. Relaxed to match
without the colon.

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 #16077...

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

View workflow run

Revert the GetPrNumber() guard on the NuGet version prompt wait. The
'(based on NuGet.config)' prompt DOES appear when running aspire add
from a PR bundle install, so we must always handle it in CI.

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 #16077...

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

View workflow run

TypeScript AppHost with bundle install: aspire add completes without a
NuGet version selection prompt. The bundle provides package versions
directly. This differs from Python projects which still show the prompt.

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 #16077...

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

View workflow run

The CLI now prompts 'Would you like to configure AI agent environments?'
after aspire new completes. This test uses the SequenceBuilder pattern
and was missing the agent init prompt handling, causing it to hang.

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 #16077...

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 — 68 recordings uploaded (commit cc5ea68)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ 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
CreateStartAndStopAspireProject ▶️ 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
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
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ 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 #24304301289

@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 23 passed, 9 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-PythonFastApiDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksDeployTypeScriptDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AppServicePythonDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcrPurgeTaskDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksDeployStarterDeploymentTests ❌ Failed ▶️ View Recording

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.

2 issues found (1 potential bug, 1 resource leak).

.Type("n").Enter()
.WaitForSuccessPrompt(counter, TimeSpan.FromMinutes(1));

// Step 4: Navigate to project directory
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.

The WaitUntil matches on either the agent init prompt or the success prompt. But .Wait(500).Type("n").Enter() runs unconditionally. If aspire new completes without showing the agent init prompt (success prompt matches instead), typing "n" + Enter at the shell runs n as a command (exit code 127 / ERR), causing WaitForSuccessPrompt to time out.

This needs to check which condition was actually matched and only type "n" when the agent init prompt was seen.


private async Task CleanupResourceGroupAsync(string resourceGroupName)
{
try
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.

Process implements IDisposable and holds OS handles but is never disposed here. Should be:

using var process = new System.Diagnostics.Process { ... };

This is a pre-existing pattern copied across ~16 deployment test classes — consider fixing it in the existing locations as well.

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.

4 participants