Skip to content

Add `artifactType` field to manifests

In the OCI distribution spec, pushing manifests with a subject specifies the following:

When pushing a manifest with the subject field and the OCI-Subject header was not set, the client MUST: ... 6. Append a descriptor for the pushed manifest to the manifests in the referrers list. The value of the artifactType MUST be set to the artifactType value in the pushed manifest, if present. If the artifactType is empty or missing in a pushed image manifest, the value of artifactType MUST be set to the config descriptor mediaType value. All annotations from the pushed manifest MUST be copied to this descriptor.

The container registry currently does not implement the artifactType field for manifests, so we need to implement this.

Implementation plan

  1. Add a new column artifact_type varchar to the manifests table
  2. When new manifests are pushed, set this value to the artifactType field from the pushed manifest. If the field is not set, use the mediaType.
Edited by Brian Williams