Skip to content

Fix AcrPurgeTask deployment test TypeScript API calls#16159

Merged
eerhardt merged 2 commits intomicrosoft:mainfrom
eerhardt:fix-acr-purge-task-ts
Apr 14, 2026
Merged

Fix AcrPurgeTask deployment test TypeScript API calls#16159
eerhardt merged 2 commits intomicrosoft:mainfrom
eerhardt:fix-acr-purge-task-ts

Conversation

@eerhardt
Copy link
Copy Markdown
Member

@eerhardt eerhardt commented Apr 14, 2026

Description

Fix the AcrPurgeTask deployment E2E test's TypeScript AppHost code to use proper await and positional parameters.

The test modifies apphost.ts to add an Azure Container App Environment with a purge task. The TypeScript SDK methods return Promises and need await, and withPurgeTask() uses positional args (not an options object).

Changes

  • Add await on addAzureContainerAppEnvironment() and getAzureContainerRegistry() calls
  • Use positional args for withPurgeTask(schedule, filter, ago, keep) instead of { keep: 1 }

Verified

  • Audited all other deployment tests using apphost.ts -- they all use await correctly
  • Tests using apphost.cs (C# AppHost via aspire init) are unaffected

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 (this IS a test fix)
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

Add missing 'await' on addAzureContainerAppEnvironment() and
getAzureContainerRegistry() calls which return Promises in TypeScript.
Also use positional args for withPurgeTask() instead of an options object
to match the generated TypeScript SDK signature.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 17:09
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

Note

Copilot was unable to run its full agentic suite in this review.

Fixes the AcrPurgeTask deployment E2E test’s generated TypeScript AppHost script to correctly await async SDK calls and to invoke withPurgeTask using positional parameters expected by the TypeScript API.

Changes:

  • Await addAzureContainerAppEnvironment() and getAzureContainerRegistry() to avoid calling methods on unresolved Promises.
  • Update withPurgeTask invocation to use positional parameters (setting keep via the 4th argument).

Comment thread tests/Aspire.Deployment.EndToEnd.Tests/AcrPurgeTaskDeploymentTests.cs Outdated
Comment thread tests/Aspire.Deployment.EndToEnd.Tests/AcrPurgeTaskDeploymentTests.cs Outdated
@eerhardt
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 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 -- 16159

Or

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

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16159...

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 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 14, 2026 18:19 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 14, 2026 18:19 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 14, 2026 18:19 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 14, 2026 18:19 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 14, 2026 18:19 Inactive
@eerhardt eerhardt enabled auto-merge (squash) April 14, 2026 18:40
@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 26 passed, 4 failed, 0 cancelled

View test results and recordings

View workflow run

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

@eerhardt eerhardt merged commit 9dc8f01 into microsoft:main Apr 14, 2026
312 of 316 checks passed
@eerhardt eerhardt deleted the fix-acr-purge-task-ts branch April 14, 2026 19:37
@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 AcrPurgeTask deployment test TypeScript API calls

Add missing 'await' on addAzureContainerAppEnvironment() and
getAzureContainerRegistry() calls which return Promises in TypeScript.
Also use positional args for withPurgeTask() instead of an options object
to match the generated TypeScript SDK signature.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Apply suggestion from @eerhardt

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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