Fix AKS deployment test timeouts and ACR token expiration#14591
Conversation
- 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>
|
/deployment-test |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14591Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14591" |
|
🚀 Deployment tests starting on PR #14591... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
There was a problem hiding this comment.
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-acrtimeout 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 |
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22292193918 |
|
✅ Deployment E2E Tests passed Summary: 21 passed, 0 failed, 0 cancelled Passed Tests
🎬 Terminal Recordings
|
|
/deployment-test |
|
🚀 Deployment tests starting on PR #14591... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
✅ Deployment E2E Tests passed Summary: 21 passed, 0 failed, 0 cancelled Passed Tests
🎬 Terminal Recordings
|
* 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>
Summary
Fixes intermittent failures in
AksStarterDeploymentTestsandAksStarterWithRedisDeploymentTests.Root Causes Identified
az aks update --attach-acrtimeout too short (3 min): The ReconcilingAddons phase after updating ACR role assignments can take several minutes. Increased to 5 minutes.Pod readiness timeout too short (120s): After Helm deployment, pods need time to pull images from ACR and start. Increased
kubectl waittimeout from 120s to 300s.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.jsonmay be stale by the time images are pushed. Added a re-login step after AKS provisioning completes.Changes
az aks updatetimeout from 3→5 minutesEvidence
Recent failures from workflow run #22208855323:
AksStarterDeploymentTests:kubectl waittimed out - pods not ready within 120sAksStarterWithRedisDeploymentTests:WaitUntil timed out after 00:03:00onaz aks update --attach-acr