Repository navigation
Avoid task replacement when registry digest resolution fails - #140
Open
Cicibot2026 wants to merge 1 commit into
Open
Cicibot2026 wants to merge 1 commit into
Cicibot2026 wants to merge 1 commit into
Conversation
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.
A transient registry failure during
docker service update --image=<tag>can remove an existing digest and replace healthy tasks with the same image. A subsequent successful resolution adds the digest back and causes another replacement. This is the tag/digest flapping reported in #110.The existing
docker manifest inspectpreflight does not prevent this: the registry can become unavailable between that check and Docker's subsequent tag resolution.This change resolves the target digest with Buildx before modifying the service, rejects failed or invalid resolutions, and passes the resolved reference to the update command. An unchanged reference is skipped unless
UPDATE_OPTIONSis set, preserving explicitly requested update options such as--force. Each later cycle still resolves the original tag, so this does not freeze updates at a particular version.Compatibility:
docker:28base image; no additional packages.WITH_NO_RESOLVE_IMAGEandWITH_INSECURE_REGISTRYmodes on their existing path. This PR does not claim to fix digest flapping in those opt-in modes; Buildx has no equivalent to the currentmanifest inspect --insecureflag.Validation:
bash -n shepherd, the existingshellcheck --shell bash shepherd, and a build using the unchanged Dockerfile all pass. The built image contains Docker 28.5.2 and Buildx 0.29.1, with the expected script content.No test framework, CI restructuring, production configuration, or unrelated updater behavior is introduced. I can provide the standalone reproduction steps if useful for review.