Skip to content

Proposal: descriptor: "dependency" property #657

@AkihiroSuda

Description

@AkihiroSuda

A blob referenced via descriptor MAY be a fine-graind CAS archive. e.g. continuity manifest. (WIP: #577)

This might make it difficult to implement "gc" for blob store, because the actual referenced blob set cannot be assured just by parsing OCI descriptors.

So I suggest adding a new property named dependency to the descriptor spec.

{
  "mediaType": "application/vnd.continuity.manifest.v0+json",
  "digest": "sha256:deadbeef",
  "size": 424242,
  "dependency": {
    "type": "media-specific"
  },
}

When dependency.type is media-specific, implementations can skip pruning unless it is aware of the corresponding mediaType.

Spec Proposal (for v1.0 if possible)

  • dependency.type string

    This OPTIONAL property specifies the type of the content set that targeted content refers.
    Values SHOULD be one of the followings:

    • ``(empty): the set is empty
    • media-specific: the set is specific to the media type of the targeted content

Implementor's Note
Implementations MAY compute unreferenced blob set so as to prune them.
When implementations encouters a descpritor of which dependency.type is media-specific and the implementation is not aware of the corresponding media type, or dependency.type is set to unknown value, the implementation SHOULD NOT try to compute unreferenced blob set.

Post-v1

e.g. list (can be huge)

"dependency": {
  "type": "list",
  "list": [
    "sha256:f00",
    "sha256:baa",
  ]
}

e.g. list as a text file blob

"dependency": {
  "type": "blob",
  "blob": {
    "mediaType": "application/vnd.oci.dependency.v2+text",
    "digest": "sha256:ba2",
    "size": 4242
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions