Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish: Publish layers manifest with tag
Publish the non-OCI compliant layers manifest with a tag. It helps to overcome the error that occurs during manifest posting in the distribution code. For some reason, it invokes `distribution.UnmarshalManifest` to calculate manifest digest which deserializes and serializes the manifest and checks manifest consistency. The latter yields the error because the layers manifest has an image index media type which is not correct if a manifest has layers. While, the layers manifest is not OCI compiant there is no any reason to invoke `distribution.UnmarshalManifest` to calculate manifest digest if just `digest.FromBytes(manifest.Payload())` could be invoked... This change simply sets the tag for the manifest reference to be published which helps to bypass the code that invokes `distribution.UnmarshalManifest` and avoid the error. The following code verifies/compares the published digest with expected one which guarantees consistency. Signed-off-by: Mike Sul <[email protected]>
- Loading branch information