Fix concurrent multi-platform push failures in local registry (registry:3)#632
Closed
Fix concurrent multi-platform push failures in local registry (registry:3)#632
Conversation
…pine jobs Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenDJ/sessions/dae69ca6-70e7-41a4-9072-3ad6f5a29158 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Docker registry service configuration for multi-platform pushes
Fix concurrent multi-platform push failures in local registry (registry:3)
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
registry:3has a known race condition with concurrent multi-platform Buildx pushes — blobs are uploaded but not immediately resolvable by subsequent HEAD requests, causing"blob unknown to registry"and"manifest unknown"errors in bothbuild-dockerandbuild-docker-alpinejobs.Changes
envblock to theregistryservice in bothbuild-dockerandbuild-docker-alpinejobs:REGISTRY_VALIDATION_DISABLED— suppresses strict manifest validation that rejects blobs mid-push during concurrent platform writesREGISTRY_STORAGE_REDIRECT_DISABLE— forces direct filesystem reads, eliminating the redirect path where blobs appear missing immediately after uploadREGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY— pins the storage root explicitly for consistent behaviorREGISTRY_STORAGE_DELETE_ENABLED— allows cleanup of partial/failed uploadsOriginal prompt
Problem
The
build-dockerandbuild-docker-alpinejobs in.github/workflows/build.ymlare failing because the local Docker registry service usesregistry:3, which has known issues with concurrent multi-platform (multi-arch) pushes via Docker Buildx. The registry races on blob uploads — blobs are uploaded but cannot immediately be resolved by subsequent HEAD requests, resulting in"blob unknown to registry"and"manifest unknown"errors.See PR #626 for context: #626
Required Changes
Apply both of the following fixes to the
registryservice containers in.github/workflows/build.yml:Fix 1: Enable compatibility workarounds via environment variables
For both the
build-dockerjob (around line 283-287) and thebuild-docker-alpinejob (around line 347-351), add environment variables to the registry service:Fix 2: Configure filesystem storage driver explicitly and disable redirect
For both the
build-dockerjob and thebuild-docker-alpinejob, also add these environment variables:So the final result for both
build-dockerandbuild-docker-alpinejobs should have the registry service configured as:Keep the
image: registry:3— do NOT downgrade toregistry:2. The fix is to add theenvblock with all four environment variables to both registry service definitions.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for failing job 70645400141. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant:
Let me start by retrieving the job logs and the PR details to understand the failure.
Assistant: The logs show Docker registry interactions but the actual failure cause is truncated. Let me get more details from the workflow file and the PR itself.
Assistant: ## Failing Job Analysis:
build-docker(Job 70645400141)The failure occurs in the
build-dockerjob during the multi-platform Docker image build and push to the local registry service (localhost:5000). The logs show a pattern of "blob unknown to registry" errors when pushing image layers, followed by eventual "manifest unknown" errors when attempting to push/verify OCI image manifests.Root Cause
The local Docker registry service is defined on line 285 as:
The
registry:3image is being used, which is the Docker Distribution v3 (based on CNCF Distribution). This version has known issues with concurrent multi-platform (multi-arch) pushes via Docker Buildx. When Buildx pushes multiple platform manifests simultaneously, the registry races on blob uploads — blobs are uploaded but cannot immediately be resolved by subsequent HEAD requests, resulting in"blob unknown to registry"and"manifest unknown"errors.Solution
Option 1 (Recommended): Pin to registry v2, which is stable for this use case:
This applies to both the
build-dockerjob (line 285) and thebuild-docker-alpinejob (line 349).Option 2: If
registry:3is required, enable the compatibility workaround by setting environment variables on the registry container:Option 3: Use
registry:3with the filesystem storage driver explicitly configured and disable redirect: