Skip to content

Add ACR purge task deployment E2E test#14738

Merged
eerhardt merged 9 commits intodotnet:release/13.2from
eerhardt:AddAcrPurgeDeploymentTest
Feb 27, 2026
Merged

Add ACR purge task deployment E2E test#14738
eerhardt merged 9 commits intodotnet:release/13.2from
eerhardt:AddAcrPurgeDeploymentTest

Conversation

@eerhardt
Copy link
Member

Description

Add a deployment E2E test for the WithPurgeTask and GetAzureContainerRegistry APIs added in #14683.

The test validates the ACR purge task feature end-to-end against real Azure infrastructure:

  1. Creates a Python FastAPI/React starter template using aspire new
  2. Adds an ACA environment and configures the container registry with .GetAzureContainerRegistry().WithPurgeTask("* * * * *", keep: 1)
  3. Deploys twice to push multiple container image tags to the registry
  4. Runs the purge task via az acr task run --name purgeOldImages --registry <name>
  5. Verifies that images were purged and only 1 tag remains per repository

Fixes # (issue)

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

Add a deployment test that validates the WithPurgeTask and
GetAzureContainerRegistry APIs end-to-end against real Azure
infrastructure. The test:

1. Creates a Python FastAPI/React starter template
2. Adds ACA environment with a purge task (every minute, keep 1)
3. Deploys twice to push multiple image tags
4. Runs the purge task via az acr task run
5. Verifies only 1 tag remains per repository

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 26, 2026 17:55
@eerhardt
Copy link
Member Author

/deployment-test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14738

Or

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

@eerhardt
Copy link
Member Author

/deployment-test

@github-actions
Copy link
Contributor

🚀 Deployment tests starting on PR #14738...

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

View workflow run

Copy link
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

This PR adds a comprehensive end-to-end test for the ACR purge task feature introduced in PR #14683. The test validates that the WithPurgeTask and GetAzureContainerRegistry APIs work correctly in a real Azure deployment scenario by deploying a Python FastAPI application twice, running the purge task, and verifying that old container images are cleaned up according to the configured retention policy.

Changes:

  • Adds AcrPurgeTaskDeploymentTests.cs with a complete E2E test that creates a Python starter project, deploys it twice to Azure Container Apps with ACR purge configured, manually triggers the purge task, and verifies only 1 tag remains per repository

@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 26, 2026 18:03 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 27, 2026 14:52 Inactive
@github-actions
Copy link
Contributor

Deployment E2E Tests failed

Summary: 24 passed, 1 failed, 0 cancelled

View workflow run

Passed Tests

  • ✅ AksStarterDeploymentTests
  • ✅ AksStarterWithRedisDeploymentTests
  • ✅ AcaCompactNamingDeploymentTests
  • ✅ AppServiceReactDeploymentTests
  • ✅ AcaCustomRegistryDeploymentTests
  • ✅ AcaCompactNamingUpgradeDeploymentTests
  • ✅ AcaStarterDeploymentTests
  • ✅ AppServicePythonDeploymentTests
  • ✅ AuthenticationTests
  • ✅ AcaExistingRegistryDeploymentTests
  • ✅ VnetKeyVaultConnectivityDeploymentTests
  • ✅ AcaDeploymentErrorOutputTests
  • ✅ AcrPurgeTaskDeploymentTests
  • ✅ AzureEventHubsDeploymentTests
  • ✅ AzureContainerRegistryDeploymentTests
  • ✅ AzureAppConfigDeploymentTests
  • ✅ VnetStorageBlobInfraDeploymentTests
  • ✅ AzureKeyVaultDeploymentTests
  • ✅ VnetSqlServerInfraDeploymentTests
  • ✅ VnetKeyVaultInfraDeploymentTests
  • ✅ AzureLogAnalyticsDeploymentTests
  • ✅ AzureStorageDeploymentTests
  • ✅ PythonFastApiDeploymentTests
  • ✅ AzureServiceBusDeploymentTests

Failed Tests

  • ❌ VnetStorageBlobConnectivityDeploymentTests

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResourceCore ▶️ View Recording
DeployAzureContainerRegistryResourceCore ▶️ View Recording
DeployAzureEventHubsResourceCore ▶️ View Recording
DeployAzureKeyVaultResourceCore ▶️ View Recording
DeployAzureLogAnalyticsResourceCore ▶️ View Recording
DeployAzureServiceBusResourceCore ▶️ View Recording
DeployAzureStorageResourceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppServiceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerAppsCore ▶️ View Recording
DeployPythonStarterWithPurgeTaskCore ▶️ View Recording
DeployReactTemplateToAzureAppServiceCore ▶️ View Recording
DeployStarterTemplateToAksCore ▶️ View Recording
DeployStarterTemplateToAzureContainerAppsCore ▶️ View Recording
DeployStarterTemplateWithCustomRegistryCore ▶️ View Recording
DeployStarterTemplateWithExistingRegistryCore ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpointCore ▶️ View Recording
DeployStarterTemplateWithRedisToAksCore ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpointCore ▶️ View Recording
DeployVnetKeyVaultInfrastructureCore ▶️ View Recording
DeployVnetSqlServerInfrastructureCore ▶️ View Recording
DeployVnetStorageBlobInfrastructureCore ▶️ View Recording
DeployWithCompactNamingFixesStorageCollisionCore ▶️ View Recording
DeployWithInvalidLocation_ErrorOutputIsCleanCore ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccountsCore ▶️ View Recording

@eerhardt eerhardt merged commit e02ebaf into dotnet:release/13.2 Feb 27, 2026
374 of 375 checks passed
@eerhardt eerhardt deleted the AddAcrPurgeDeploymentTest branch February 27, 2026 17:06
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 27, 2026
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