Skip to content

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 7, 2026

Fixes #1508

Introduce artifactImage wrapper that injects the artifactType field and replaces the config blob with the OCI empty descriptor, since go-containerregistry's v1.Manifest struct does not support artifactType.

Push now wraps images with NewArtifactImage so pushed manifests include artifactType (application/vnd.docker.cagent.config.v1+json) and an empty config descriptor per the OCI image spec guidelines for artifact usage.

Assisted-By: cagent

Introduce artifactImage wrapper that injects the artifactType field and
replaces the config blob with the OCI empty descriptor, since
go-containerregistry's v1.Manifest struct does not support artifactType.

Push now wraps images with NewArtifactImage so pushed manifests include
artifactType (application/vnd.docker.cagent.config.v1+json) and an empty
config descriptor per the OCI image spec guidelines for artifact usage.

Assisted-By: cagent
@dgageot dgageot requested a review from a team as a code owner February 7, 2026 09:39
@dgageot
Copy link
Member Author

dgageot commented Feb 7, 2026

@jcarter3 Would that fix the issue?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

No issues found

This PR correctly implements an OCI artifact wrapper that injects the artifactType field into manifests. The implementation:

  • Properly uses json.RawMessage for pre-encoded JSON handling
  • Correctly overrides manifest-related methods while preserving config and layers
  • Has good test coverage verifying the artifactType injection and preservation of base image properties
  • Follows Go best practices with appropriate error handling

The code is well-designed and production-ready.

@dgageot dgageot merged commit 099265b into docker:main Feb 8, 2026
8 checks passed
@jcarter3
Copy link
Contributor

@dgageot That fixes the artifact type issues, yes! The layers are still showing as tar.gzip though, when they are just plain yaml files. So that part still needs fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configs pushed to OCI registries are not valid artifacts

3 participants