← Back to Pull requests

Push weblog base images directly to the CI mirror #8597

Closed
unknown closed this pull request without merging on Nov 20, 2026 11:51 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 14:21 UTC
Author

Motivation

Weblog base images (datadog/system-tests:<name>.base-<hash>) are pushed to Docker Hub by build_base_images, then copied to registry.ddbuild.io/system-tests/mirror and signed by mirror_images, which has to wait for build_base_images. This removes that extra step: the base image build publishes to both registries directly, and the mirroring no longer knows about base images.

Changes

  • build_base_images.py --merge pushes the multi-arch tag to Docker Hub and to the mirror, only where it is missing, at the path BuildKit's docker.io mirror already resolves (buildkitd.toml). When one registry already has it, that image is copied as is, so both serve the same digest. The per-arch jobs skip when either registry has the tag.

  • Every --merge run checks that the mirror copy is signed (ddsign resolve) and signs it with ddsign if not, also when both registries already have the tag. So a run that failed after pushing (ddsign failure, or a partial push) is fixed by the next one. The job gets the image-integrity id_token for that.

  • The mirroring code is generic again: update_mirror_images.py and _image_mirror.py have no base-image code.

  • - Base images are no longer in the mirror list: dockerfile_image_list() skips the FROM system_tests_base_ aliases, which build.sh supplies as named build contexts, instead of resolving them. get-image-list.py still pre-pulls them when the build runs without the mirror (GitHub Actions).
    - The weblog list comes from WeblogMetaData, instead of globbing every
    .Dockerfile, which also matched the 41 .base.Dockerfile files. That drops the 22 images only base Dockerfiles use (maven, python:-slim, public.ecr.aws/lambda/, ...): 46 images remain in mirror_images.yaml / mirror_images.lock.yaml. No mirrored image comes from public.ecr.aws anymore, so the regenerated buildkitd.toml drops that registry.
  • mirror_images no longer needs build_base_images. Child pipelines already wait on build_base_images.

  • After a base image change, only base-images.lock.json needs a commit: the mirror files are untouched. The "Update mirror images" step of update-lambda-extension.yml is removed. Docs updated.
  • Verified on CI: the GitLab build_base_images and mirror_images jobs passed on this PR. This PR touches the base image tooling, so the job processes every base image.

    Still to check on the next pipeline: main moved 28 php base images to new tags (#8575) without adding them to the mirror lock, so they are probably not in the mirror yet. The first pipeline after the merge of main should copy them from Docker Hub and sign them, which exercises the registry.ddbuild.io push from the docker-in-docker runners.

    Known limitation: running build_base_images.py from a laptop to publish now needs access to the mirror and ddsign.

    Diff: 356 lines (+267 / -89) across 4 files Reviewer: pawelchcki Review duration: 1289m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 356 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8597"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.5% (MEDIUM) · Higher = larger blast radius
    42.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.8% · Safe to merge
    16.8%