Skip to content

wkg packages publishes/pushed to OCI missing org.opencontainers.image.title for layers #238

Description

@nonik0

Description

Artifacts pushed by wkg publish and wkg oci push don't include the org.opencontainers.image.title annotation on their application/wasm layers. OCI tools like oras will skip over pulling the layers missing this annotation that they use for the filename on disk.

Repro

wkg oci push registry.example.com/myns/mypkg:1.0.0 mypkg.wasm
oras pull registry.example.com/myns/mypkg:1.0.0 --output ./out
# exits 0, ./out is empty

Fix

wkg includes the org.opencontainers.image.title the layers defined in the package manifest, e.g.:

{
  "annotations": {
      "org.opencontainers.image.version": "1.2.3"
  },
  "config": {
      "digest": "sha256:...",
      "mediaType": "application/vnd.wasm.config.v0+json",
      "size": 123
  },
  "layers": [
      {
          "digest": "sha256:...",
          "mediaType": "application/wasm",
          "size": 12345,
          "annotations": {
              "org.opencontainers.image.title": "mypkg.wasm"
          }
      }
  ],
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "schemaVersion": 2
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions