Skip to content

Image pull fallback from Azure#1624

Open
truggeri wants to merge 3 commits intomainfrom
truggeri/fallback-image-pull-with-experiments
Open

Image pull fallback from Azure#1624
truggeri wants to merge 3 commits intomainfrom
truggeri/fallback-image-pull-with-experiments

Conversation

@truggeri
Copy link
Contributor

Summary

We have added a fallback container registry in Azure that hosts a copy of all the container images we pull in this repo. This PR makes use of this fallback registry by,

  1. Allowing the image service to pull from azure-api.net
  2. Updating our main to fallback to pulling from Azure should the first attempt from GHCR fail
  • Images are stored under the same path, so a simple prefix of the Azure api works
  • Provide the Updater code with the image that successfully pulled
  1. Updates tests

Both the backup pull from Azure and a pull from GHCR are gated by experiment flags. This will allow us to opt-in to pulling from Azure and opt-out to pulling from GHCR which will allow us to confirm the feature is working outside of an incident.

@truggeri truggeri self-assigned this Feb 26, 2026
@truggeri truggeri requested a review from a team as a code owner February 26, 2026 19:24
Copilot AI review requested due to automatic review settings February 26, 2026 19:24
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

Adds an Azure-hosted fallback registry for updater/proxy container images, intended to improve resilience when pulls from GHCR fail and to gate behavior via experiment flags.

Changes:

  • Add experiment-gated fallback logic in run() to retry image pulls from an Azure registry when the primary pull fails.
  • Extend ImageService repository allowlist to permit *.azure-api.net image sources.
  • Update unit tests and documentation to reflect the new fallback registry behavior.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/main.ts Implements experiment-gated primary/fallback pull logic and passes the successfully pulled image references into Updater.
src/image-service.ts Updates allowed image repository validation to include Azure registry hosts.
docker/README.md Documents existence of the Azure fallback registry.
dist/main/index.js Updates the compiled Action bundle (but currently appears inconsistent with src/ changes).
tests/main.test.ts Adds/adjusts tests around image-pull failure scenarios.
tests/image-service.test.ts Updates error message expectation and adds an Azure-related pull test (currently focused on retry helper).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@truggeri truggeri force-pushed the truggeri/fallback-image-pull-with-experiments branch 3 times, most recently from 137abc2 to 1ec5ef8 Compare February 27, 2026 19:11

if (!imagesPulled && experiments[FEATURE_PULL_FROM_AZURE]) {
core.warning('Primary image pull failed, attempting fallback')
updaterImage = `${FALLBACK_CONTAINER_REGISTRY}/${updaterImage}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this be, for example

dependabot-acr-apim-production.azure-api.net/ghcr.io/dependabot/dependabot-updater-gomod:123

Is that the expected URL or did I get it wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. We prefixed everything so the images are at the same image location with the Azure api prepended.

$ docker pull dependabot-acr-apim-production.azure-api.net/ghcr.io/dependabot/dependabot-updater-gomod
Using default tag: latest
latest: Pulling from ghcr.io/dependabot/dependabot-updater-gomod
...
Digest: sha256:399027984e3437acb2e107726d8678b1b4eec5a383ee5281820542baaeff162e
Status: Downloaded newer image for dependabot-acr-apim-production.azure-api.net/ghcr.io/dependabot/dependabot-updater-gomod:latest
dependabot-acr-apim-production.azure-api.net/ghcr.io/dependabot/dependabot-updater-gomod:latest

* Allow images to be pulled from azure-api.net
* Fallback to pulling images from Azure api
* Tests
@truggeri truggeri force-pushed the truggeri/fallback-image-pull-with-experiments branch from a4a13be to 9d2808c Compare February 28, 2026 00:10
@truggeri truggeri force-pushed the truggeri/fallback-image-pull-with-experiments branch from 9d2808c to b7d44ea Compare February 28, 2026 00:11
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