Upgrading

May 24, 2022 ยท View on GitHub

This document is a place to outline the upgrade path for both clients and vendors, considering that not all will adopt the processes designed by this WG at once (or perhaps ever).

Proposal E

The following section describes the upgrade path for Proposal E.

Component defintions

The following icons and definitions will be used to illustate various scenarios in the context of this document.

Producer

A producer of images and/or artifacts (a client that "pushes")

IconStateDescription
๐ŸŒฑ (leaf)CurrentBuild tooling that does not push references
๐ŸŒฟ (tree branch)IntermediatePushes image-spec manifests with "refers" field, includes tags if refers API missing
๐ŸŒฒ (whole tree)CompletePushes references using new manifest

Registry

A service that hosts images and/or artifacts

IconStateDescription
๐Ÿšฒ (bicycle)CurrentReferences supported via tags/"refers" field in existing image-spec manifest
๐Ÿ›ต (moped)*IntermediateN/A
๐Ÿ (motocycle)CompleteSupports new API and manifest

* It has been determined that there is not a valid "Intermediate" registry state.

Consumer

A consumer of images and/or artifacts (a client that "pulls")

IconStateDescription
๐Ÿ€ (rat)CurrentExisting runtime that is unaware of refers
๐Ÿฟ (squirrel)IntermediateDiscovers image-spec manifest references via refers API, falls back to tags if refers API is missing
๐Ÿฆซ (beaver)CompleteDiscovers referrers via new API and manifest

Scenarios

There are a total of 18 component combinations listed below. Note: supported scenarios have descriptions in bold.

ProducerRegistryConsumerDescription
1๐ŸŒฑ๐Ÿšฒ๐Ÿ€Present state, no refers
2๐ŸŒฑ๐Ÿšฒ๐ŸฟConsumer looking for refers that don't exist
3๐ŸŒฑ๐Ÿšฒ๐ŸฆซConsumer looking for refers that don't exist
4๐ŸŒฑ๐Ÿ๐Ÿ€Present state, no refers
5๐ŸŒฑ๐Ÿ๐ŸฟConsumer looking for refers that don't exist
6๐ŸŒฑ๐Ÿ๐ŸฆซConsumer looking for refers that don't exist
7๐ŸŒฟ๐Ÿšฒ๐Ÿ€Producer creating refers, consumer isn't using refers and is not impacted
8๐ŸŒฟ๐Ÿšฒ๐ŸฟProducer / consumer working in compatibility mode with tags
9๐ŸŒฟ๐Ÿšฒ๐ŸฆซConsumer wants artifact-spec, but can fall back to image-spec refers using tags
10๐ŸŒฟ๐Ÿ๐Ÿ€Producer creating refers, consumer isn't using refers and is not impacted
11๐ŸŒฟ๐Ÿ๐ŸฟProducer / consumer using image-spec manifests and referrers API
12๐ŸŒฟ๐Ÿ๐ŸฆซProducer pushes image-spec manifest, consumer discovers refers via new API and would prefer new manifest
13๐ŸŒฒ๐Ÿšฒ๐Ÿ€Producer attempts to push new manifest, registry rejects as new manifest is unknown
14๐ŸŒฒ๐Ÿšฒ๐ŸฟProducer attempts to push new manifest, registry rejects as new manifest is unknown
15๐ŸŒฒ๐Ÿšฒ๐ŸฆซProducer attempts to push new manifest, registry rejects as new manifest is unknown
16๐ŸŒฒ๐Ÿ๐Ÿ€Producer creates new manifest, consumer isn't using refers and is not impacted
17๐ŸŒฒ๐Ÿ๐ŸฟProducer pushes new manifest, consumer finds refers via new API but cannot parse new manifest
18๐ŸŒฒ๐Ÿ๐ŸฆซProducer and consumer both use new manifest and API

Registry Transition

  1. Registry in current state, referrers pushed as tags. Registries should not block refer field in manifests, but do not need to parse it.
  2. Registry indexes refer field in new manifests, reindexes old manifests with a digest tag.
  3. Registry enables referrers API and artifact manifest, clients stop pushing or querying digest tags.

Extensions API for Distribution

Beginning in OCI Distribution Spec v1.1.0 (not yet released), the Extensions API for Distribution will provide a method for asking a registry (or individual repository) for which extensions are supported:

GET /v2/_oci/ext/discover
GET /v2/{name}/_oci/ext/discover
200 OK
Content-Length: <length>
Content-Type: application/json

{
    "extensions": [
        {
            "name": "_<extension>",
            "description": "",
            "url": "..."
        }
    ]
}

This may provide a useful upgrade path as new APIs designed by this WG are proposed but not yet accepted by other parts of the OCI and wider community.