Skip to content

ci: make Azure emulator Docker pulls resilient#10191

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:reubenbond/fix-ci-docker-pulls
Jun 9, 2026
Merged

ci: make Azure emulator Docker pulls resilient#10191
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:reubenbond/fix-ci-docker-pulls

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jun 8, 2026

Copy link
Copy Markdown
Member

This fixes CI flakes in Azure provider jobs caused by blocked or denied Microsoft Container Registry pulls for emulator images.

The workflow now centralizes the Docker image references at the workflow env level, pins Azurite and the Event Hubs emulator by digest, preserves the existing Cosmos DB emulator digest pin, and pulls each manual docker run image through a shared retry/backoff helper before starting containers with --pull=never.

Cleanup remains best-effort so teardown errors do not mask the original startup or test failure, and the centralized image variables make it straightforward to switch to GHCR mirrors later.

Microsoft Reviewers: Open in CodeFlow

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

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 hardens the Azure provider CI jobs against flaky/blocked pulls from Microsoft Container Registry by centralizing emulator image references, pinning them by digest, and adding a reusable pull retry/backoff helper before container startup.

Changes:

  • Centralized Azurite, Event Hubs emulator, and Cosmos DB emulator image references as workflow-level env vars and pinned Azurite/Event Hubs by digest.
  • Added a shared docker pull retry/backoff script and switched manual docker run invocations to --pull=never after a successful pull.
  • Made emulator container cleanup best-effort so teardown failures don’t mask test/startup failures.
Show a summary per file
File Description
.github/workflows/ci.yml Centralizes emulator image refs, uses pull-with-retry before docker run --pull=never, and makes cleanup best-effort.
.github/scripts/docker-pull-with-retry.sh New Bash helper providing retry/backoff for docker pull operations.
.gitattributes Ensures LF line endings for GitHub Actions Bash helper scripts.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

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.

2 participants