Skip to content

Fix AKS deployment test timeouts and ACR token expiration#14591

Merged
mitchdenny merged 2 commits into
release/13.2from
fix/aks-deployment-test-timeouts
Feb 23, 2026
Merged

Fix AKS deployment test timeouts and ACR token expiration#14591
mitchdenny merged 2 commits into
release/13.2from
fix/aks-deployment-test-timeouts

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Summary

Fixes intermittent failures in AksStarterDeploymentTests and AksStarterWithRedisDeploymentTests.

Root Causes Identified

  1. az aks update --attach-acr timeout too short (3 min): The ReconcilingAddons phase after updating ACR role assignments can take several minutes. Increased to 5 minutes.

  2. Pod readiness timeout too short (120s): After Helm deployment, pods need time to pull images from ACR and start. Increased kubectl wait timeout from 120s to 300s.

  3. ACR Docker credentials expire during AKS provisioning: The initial ACR login (Step 4b) happens before AKS creation which takes 10-15 minutes. OIDC federated tokens expire after ~5 minutes, so Docker credentials in ~/.docker/config.json may be stale by the time images are pushed. Added a re-login step after AKS provisioning completes.

Changes

  • Both test files: Increased az aks update timeout from 3→5 minutes
  • Both test files: Increased pod readiness timeout from 120s→300s
  • Both test files: Added ACR re-login step after AKS provisioning

Evidence

Recent failures from workflow run #22208855323:

  • AksStarterDeploymentTests: kubectl wait timed out - pods not ready within 120s
  • AksStarterWithRedisDeploymentTests: WaitUntil timed out after 00:03:00 on az aks update --attach-acr

- Increase az aks update --attach-acr timeout from 3 to 5 minutes
  (ReconcilingAddons phase can take several minutes)
- Increase kubectl wait pod readiness timeout from 120s to 300s
  (pods need time to pull images from ACR and start)
- Add ACR re-login step after AKS creation to refresh Docker
  credentials that may have expired during 10-15 min provisioning
  (OIDC federated tokens expire after ~5 minutes)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 03:20
@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

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

Or

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #14591...

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

View workflow run

Copilot AI left a comment

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.

Pull request overview

This PR fixes intermittent test failures in AKS deployment end-to-end tests by addressing three root causes: insufficient timeouts for AKS-ACR integration updates, insufficient pod readiness wait times, and expired ACR authentication tokens during long-running AKS provisioning.

Changes:

  • Increased az aks update --attach-acr timeout from 3 to 5 minutes to accommodate the ReconcilingAddons phase
  • Increased pod readiness wait timeout from 120s to 300s (and corresponding WaitForSuccessPrompt from 3 to 6 minutes)
  • Added ACR re-login step after AKS provisioning to refresh Docker credentials that expire during the 10-15 minute AKS creation

Reviewed changes

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

File Description
tests/Aspire.Deployment.EndToEnd.Tests/AksStarterDeploymentTests.cs Applied timeout increases and ACR re-login for basic AKS starter deployment test
tests/Aspire.Deployment.EndToEnd.Tests/AksStarterWithRedisDeploymentTests.cs Applied identical timeout increases and ACR re-login for AKS starter with Redis deployment test

@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 20, 2026 03:26 Inactive
@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit ec20bcd:

Test Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
ResourcesCommandShowsRunningResources ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22292193918

@github-actions

Copy link
Copy Markdown
Contributor

Deployment E2E Tests passed

Summary: 21 passed, 0 failed, 0 cancelled

View workflow run

Passed Tests

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

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResource ▶️ View Recording
DeployAzureContainerRegistryResource ▶️ View Recording
DeployAzureEventHubsResource ▶️ View Recording
DeployAzureKeyVaultResource ▶️ View Recording
DeployAzureLogAnalyticsResource ▶️ View Recording
DeployAzureServiceBusResource ▶️ View Recording
DeployAzureStorageResource ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppService ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerApps ▶️ View Recording
DeployReactTemplateToAzureAppService ▶️ View Recording
DeployStarterTemplateToAks ▶️ View Recording
DeployStarterTemplateToAzureContainerApps ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpoint ▶️ View Recording
DeployStarterTemplateWithRedisToAks ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpoint ▶️ View Recording
DeployVnetKeyVaultInfrastructure ▶️ View Recording
DeployVnetSqlServerInfrastructure ▶️ View Recording
DeployVnetStorageBlobInfrastructure ▶️ View Recording
DeployWithCompactNamingFixesStorageCollision ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccounts ▶️ View Recording

@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #14591...

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 February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing February 23, 2026 03:56 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Deployment E2E Tests passed

Summary: 21 passed, 0 failed, 0 cancelled

View workflow run

Passed Tests

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

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResource ▶️ View Recording
DeployAzureContainerRegistryResource ▶️ View Recording
DeployAzureEventHubsResource ▶️ View Recording
DeployAzureKeyVaultResource ▶️ View Recording
DeployAzureLogAnalyticsResource ▶️ View Recording
DeployAzureServiceBusResource ▶️ View Recording
DeployAzureStorageResource ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppService ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerApps ▶️ View Recording
DeployReactTemplateToAzureAppService ▶️ View Recording
DeployStarterTemplateToAks ▶️ View Recording
DeployStarterTemplateToAzureContainerApps ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpoint ▶️ View Recording
DeployStarterTemplateWithRedisToAks ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpoint ▶️ View Recording
DeployVnetKeyVaultInfrastructure ▶️ View Recording
DeployVnetSqlServerInfrastructure ▶️ View Recording
DeployVnetStorageBlobInfrastructure ▶️ View Recording
DeployWithCompactNamingFixesStorageCollision ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccounts ▶️ View Recording

@mitchdenny
mitchdenny merged commit 535f8eb into release/13.2 Feb 23, 2026
706 of 709 checks passed
@mitchdenny
mitchdenny deleted the fix/aks-deployment-test-timeouts branch February 23, 2026 04:33
@dotnet-policy-service dotnet-policy-service Bot added this to the 13.2 milestone Feb 23, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Fix AKS deployment test timeouts and ACR token expiration

- Increase az aks update --attach-acr timeout from 3 to 5 minutes
  (ReconcilingAddons phase can take several minutes)
- Increase kubectl wait pod readiness timeout from 120s to 300s
  (pods need time to pull images from ACR and start)
- Add ACR re-login step after AKS creation to refresh Docker
  credentials that may have expired during 10-15 min provisioning
  (OIDC federated tokens expire after ~5 minutes)

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

* Fix WaitForSuccessPrompt timeout for chained kubectl waits

The Redis test chains 3 kubectl wait commands (300s each), so the
worst-case total is 900s (15 min). Increase WaitForSuccessPrompt
from 6 min to 16 min to provide adequate buffer.

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

---------

Co-authored-by: Mitch Denny <mitch@mitchdeny.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants