-
Notifications
You must be signed in to change notification settings - Fork 737
Description
In the aftermath of #999/the removal of the artifact mediaType, I believe that the guidance for descriptors has become misleading.
Artifacts are now represented using the standard image manifest and mediaType:
Lines 23 to 27 in 93f6e65
- **`mediaType`** *string* | |
This property SHOULD be used and [remain compatible](media-types.md#compatibility-matrix) with earlier versions of this specification and with other similar external formats. | |
When used, this field MUST contain the media type `application/vnd.oci.image.manifest.v1+json`. | |
This field usage differs from the [descriptor](descriptor.md#properties) use of `mediaType`. |
When we had a separate mediaType/artifact manifest, the following line in the descriptor specification was informative, as it implies that "images" (read: runnable content) should have a platform, but "artifacts" (arbitrary content) may or may not:
Line 61 in 93f6e65
Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details. |
However, now that there is one manifest mediaType, this advice appears to be rather unhelpful; all manifests are now the same type, so this implies that all manifests SHOULD have a platform in their descriptor.
In practice, this has lead to implementations including/believing they should include {"os": "unknown", "architecture": unknown"}
when describing non-image content (artifacts), which I believe to be misguided/incorrect, as values for these fields SHOULD be understood by the Go toolchain:
Lines 57 to 65 in 93f6e65
- **`architecture`** *string* | |
This REQUIRED property specifies the CPU architecture. | |
Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for [`GOARCH`][go-environment2]. | |
- **`os`** *string* | |
This REQUIRED property specifies the operating system. | |
Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for [`GOOS`][go-environment2]. |
I'd like to drop this line from the descriptor spec, or amend it to acknowledge artifactType
, and the config.mediaType
fallback (collectively "artifacts"); but between these options I have no strong preference.