Skip to content

Use mirrored images for all Docker image references#317

Merged
pawelchcki merged 7 commits intomasterfrom
use_mirrored_images
Mar 12, 2026
Merged

Use mirrored images for all Docker image references#317
pawelchcki merged 7 commits intomasterfrom
use_mirrored_images

Conversation

@pawelchcki
Copy link
Copy Markdown
Contributor

@pawelchcki pawelchcki commented Mar 6, 2026

  • Switch Docker image references to registry.ddbuild.io/ci/nginx-datadog/mirror/ mirrors in CI to avoid rate limits
  • Add MIRROR_REGISTRY build-arg to Dockerfiles (defaults to mirror; empty for GHA public images)
  • Add build-step retries in test/bin/run.py for transient Docker build failures

@pawelchcki pawelchcki marked this pull request as ready for review March 6, 2026 22:35
@pawelchcki pawelchcki requested a review from a team as a code owner March 6, 2026 22:35
@pawelchcki pawelchcki requested review from dmehala and removed request for a team March 6, 2026 22:35
Copilot AI review requested due to automatic review settings March 10, 2026 12:18
Copy link
Copy Markdown

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

This PR updates CI, build, and example/test artifacts to pull Docker images from the internal registry.ddbuild.io/ci/nginx-datadog/tests/images/ mirror (instead of public registries) to reduce rate limiting and external dependencies, and introduces a MIRROR_REGISTRY build-arg for the musl toolchain build image.

Changes:

  • Replace public Docker image references across GitLab CI, Dockerfiles, and docker-compose files with mirrored registry.ddbuild.io references.
  • Add MIRROR_REGISTRY build-arg support to build_env/Dockerfile and thread it through the local toolchain build target in Makefile.
  • Update GitHub Actions system-tests workflow to set MIRROR_REGISTRY="" (public pulls) and adjust shellcheck job file selection.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/services/client/Dockerfile Switch client service base image to mirrored registry.
test/Dockerfile Switch test runner base + uv stage image to mirrored registry.
injection/ingress-nginx/docker-compose.yaml Switch testagent and nginx images to mirrored registry.
example/tracing/services/client/Dockerfile Switch example client base image to mirrored registry.
example/tracing/docker-compose.yml Switch Datadog agent image reference to mirrored registry.
example/openresty/services/client/Dockerfile Switch example client base image to mirrored registry.
example/openresty/docker-compose.yml Switch Datadog agent image reference to mirrored registry.
example/ingress-nginx/test-application.yaml Switch echo-server image to mirrored registry.
example/ingress-nginx/helm/values.yaml Update ingress-nginx extra module image reference to mirrored registry (but currently malformed).
build_env/Dockerfile Add MIRROR_REGISTRY arg; pull uv and alpine via mirror and copy from the uv stage.
Makefile Pass MIRROR_REGISTRY build-arg to local toolchain build when provided.
.gitlab/common.yml Update test job image arguments to mirrored registry.
.gitlab/build-and-test-fast.yml Use mirrored base images in matrix; adjust shellcheck file selection.
.gitlab/build-and-test-all.yml Use mirrored base images in the full test matrix.
.github/workflows/system-tests.yml Set MIRROR_REGISTRY="" for GHA build job to use public registries.

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (69b4e6d) to head (94281b2).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #317   +/-   ##
=======================================
  Coverage   68.85%   68.85%           
=======================================
  Files          56       56           
  Lines        7471     7471           
  Branches     1058     1058           
=======================================
  Hits         5144     5144           
  Misses       1820     1820           
  Partials      507      507           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xlamorlette-datadog xlamorlette-datadog force-pushed the use_mirrored_images branch 2 times, most recently from 1c9770e to 145d16c Compare March 10, 2026 13:45
@xlamorlette-datadog
Copy link
Copy Markdown
Contributor

@pawelchcki

  • I added some improvements to this PR. But this PR introduces some new flakiness in tests, so I will pause my work on this.
  • I suggest to simplify registry.ddbuild.io/ci/nginx-datadog/tests/images in registry.ddbuild.io/ci/nginx-datadog, but I think this requires to conjointly modify Mirror public images to internal registry #313 for the CI tests to pass.

@pawelchcki
Copy link
Copy Markdown
Contributor Author

I suggest to simplify registry.ddbuild.io/ci/nginx-datadog/tests/images in registry.ddbuild.io/ci/nginx-datadog, but I think this requires to conjointly modify #313 for the CI tests to pass.

What do you have in mind ? just a shorter URL ?

@pawelchcki pawelchcki force-pushed the use_mirrored_images branch from 10c6e76 to 92b2a12 Compare March 10, 2026 15:18
- Migrate all Docker image references to use registry.ddbuild.io mirrors
- Factorize and simplify registry usage across CI and test configs
- Fix OpenResty detection for mirrored base images
- Ensure examples are usable outside Datadog internal infrastructure
- Add build-step retries in run.py for transient failures
- Increase npm fetch-retries in Dockerfiles
- Remove CircleCI configuration
@pawelchcki pawelchcki force-pushed the use_mirrored_images branch from 8f91483 to 5803576 Compare March 10, 2026 15:30
Copy link
Copy Markdown

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

Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.


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

Copy link
Copy Markdown
Contributor

@xlamorlette-datadog xlamorlette-datadog left a comment

Choose a reason for hiding this comment

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

Please wait for the on-going delivery (v1.13.0) to be completed before merging this.

pawelchcki and others added 4 commits March 12, 2026 15:55
- Remove trailing '/' from MIRROR_REGISTRY; use ${MIRROR_REGISTRY}/... syntax
  for readability (build_env/Dockerfile, test/Dockerfile)
- Use ARG MIRROR_REGISTRY pattern in test/Dockerfile instead of hardcoding
  the registry, matching the build_env/Dockerfile convention
- Simplify run_cmd_with_retries: remove redundant outer try/except and
  finally block so failure doesn't print both "BUILD FAILED" and
  "Build step finished" (test/bin/run.py)
- Remove duplicate .test-nginx-rum block that was overriding the
  mirrored-image version (.gitlab/common.yml)
The no-trailing-slash style breaks when MIRROR_REGISTRY is set to ""
(used in GHA for public images), producing invalid refs like
"FROM /alpine:3.20.3". The trailing '/' convention handles both cases:
- Default: "registry.ddbuild.io/.../mirror/alpine:3.20.3"
- Empty:   "alpine:3.20.3"
@pawelchcki
Copy link
Copy Markdown
Contributor Author

Thanks Xavier!

@pawelchcki pawelchcki merged commit b9e382b into master Mar 12, 2026
158 checks passed
@pawelchcki pawelchcki deleted the use_mirrored_images branch March 12, 2026 17:05
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