Rename cagent OCI annotation, keep old one#1745
Merged
dgageot merged 1 commit intodocker:mainfrom Feb 16, 2026
Merged
Conversation
There was a problem hiding this comment.
Review Summary
✅ Approved - No functional bugs found in the changed code.
This PR successfully implements the OCI annotation renaming from io.docker.cagent.version to io.docker.agent.version while maintaining backward compatibility. The changes were analyzed for potential bugs:
Changes Reviewed:
- pkg/oci/package.go: Added new annotation
io.docker.agent.versionalongside the old one, and updated config media type - pkg/remote/pull.go: Modified
hasCagentAnnotation()to check new annotation first, then fall back to old annotation
Analysis:
- Backward Compatibility: ✅ Old artifacts with only
io.docker.cagent.versionwill still be recognized through the fallback logic inhasCagentAnnotation() - Forward Compatibility: ✅ New artifacts include both annotations, so older clients can still read them
- Media Type Change: ✅ No impact on compatibility - the codebase doesn't validate config media types anywhere; only annotations are checked
- Annotation Validation: ✅ Properly handles both old and new annotation formats with appropriate fallback
The implementation correctly maintains compatibility in both directions.
2b80fcd to
ceecf4b
Compare
Collaborator
Author
|
Just rebased as the branch was a bit behind |
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
ceecf4b to
d0d4a21
Compare
dgageot
approved these changes
Feb 16, 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.
Support annotation
io.docker.agent.versionin addition to the cagent oneUpdated config media type with
docker.agent