Add ACR cache-hit checks to avoid Docker Hub rate limits on Nexus image pulls#4918
Add ACR cache-hit checks to avoid Docker Hub rate limits on Nexus image pulls#4918rudolphjacksonm with Copilot wants to merge 4 commits into
Conversation
- devops/scripts/bundle_runtime_image_build.sh: before az acr import, query ACR for the target tag; skip the import if it already exists. Errors from the query (e.g. repository not yet created) are suppressed intentionally so that any real auth/network failure is surfaced by the subsequent az acr import command. - templates/shared_services/sonatype-nexus-vm/scripts/deploy_nexus_container.sh: after successful ACR login, run `docker manifest inspect` on the target image; exit immediately with a clear diagnostic message if the image is absent from ACR instead of silently falling back to Docker Hub.
|
/test-extended 84b2c45 |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/26521694588 (with refid (in response to this comment from @rudolphjacksonm) |
|
🤖 pr-bot 🤖
(in response to this comment from @maxmartin-cgi) |
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 1982f5f. ♻️ This comment has been updated with latest results. |
|
/test-extended |
|
🤖 pr-bot 🤖
(in response to this comment from @maxmartin-cgi) |
|
/test-extended bdd5da4 |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/28945377464 (with refid (in response to this comment from @maxmartin-cgi) |
|
/test-extended bdd5da4 |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/29007828115 (with refid (in response to this comment from @maxmartin-cgi) |
Every pipeline run unconditionally calls
az acr importfor the Nexus image, hitting Docker Hub even when the image is already cached in ACR. This causes intermittent429: TOOMANYREQUESTSfailures that block CI for up to 6 hours.What is being addressed
bundle_runtime_image_build.shalways imports from Docker Hub on every publish, regardless of whether the image already exists in ACR.deploy_nexus_container.shproceeds directly todocker pullwith no preflight check, giving a confusing retry-then-timeout failure if the image was never imported.How is this addressed
devops/scripts/bundle_runtime_image_build.sh— beforeaz acr import, query ACR for the target tag and skip the import if it already exists:Query errors (repository not yet created, transient network blip) are suppressed so execution falls through to the import, which will surface real auth/network failures.
templates/shared_services/sonatype-nexus-vm/scripts/deploy_nexus_container.sh— after ACR login succeeds, rundocker manifest inspectbefore entering the pull retry loop. Exits immediately with a clear diagnostic if the image is absent: