[27.x backport] c8d/tag: Don't log a warning if the source image is not dangling#49010
Merged
[27.x backport] c8d/tag: Don't log a warning if the source image is not dangling#49010
Conversation
After the image is tagged, the engine attempts to delete a dangling image of the source image, so the image is no longer dangling. When the source image is not dangling, the removal errors out (as expected), but a warning is logged to the daemon log: ``` time="2024-12-02T10:44:25.386957553Z" level=warning msg="unexpected error when deleting dangling image" error="NotFound: image \"moby-dangling@sha256:54d8c2251c811295690b53af7767ecaf246f1186c36e4f2b2a63e0bfa42df045\": not found" imageID="sha256:54d8c2251c811295690b53af7767ecaf246f1186c36e4f2b2a63e0bfa42df045" spanID=bd10a21a07830d72 tag="docker.io/library/test:latest" traceID=4cf61671c2dc6da3dc7a09c0c6ac4e16 ``` Remove that log as it causes unnecessary confusion, as the failure is expected. Signed-off-by: Paweł Gronowski <[email protected]> (cherry picked from commit a93f6c6) Signed-off-by: Paweł Gronowski <[email protected]>
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.
After the image is tagged, the engine attempts to delete a dangling image of the source image, so the image is no longer dangling.
When the source image is not dangling, the removal errors out (as expected), but a warning is logged to the daemon log:
Remove that log as it causes unnecessary confusion, as the failure is expected.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)