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

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

@ReubenBond
ReubenBond added this pull request to the merge queue Jun 9, 2026
Merged via the queue into dotnet:main with commit b1564ea Jun 9, 2026
61 of 62 checks passed
@ReubenBond
ReubenBond deleted the reubenbond/fix-ci-docker-pulls branch June 9, 2026 20:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 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.

2 participants