Repository navigation
simplify decision tree for artifacts - #248
Conversation
Signed-off-by: Sajay Antony <[email protected]>
|
@Wwwsylvia @qweeah - please review since this would be required for the oras CLI. |
graph TD
HasBlob{Artifact has at least<br>one file or blob?}
Artifact_NoBlobs[Specify <b>artifactType</b>,<br>set config and layers<br>to empty descriptors.]
HasBlob -- No --> Artifact_NoBlobs
Looks like this subtree is not enforced by oras CLI, user can still customize config blob when no file provided in @sajayantony To align oras's behavior with this subtree, do we need to ban $ oras push localhost:5000/oras-test:push --config config
Uploading empty artifact
Pushed [registry] localhost:5000/oras-test:push
Digest: sha256:7875ad508b4d3882e7a5ce0e994c82a1ee175bf067261079e6d9bf6f25c20232
$ oras manifest fetch localhost:5000/oras-test:push | jq
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.unknown.config.v1+json",
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": 0
},
"layers": [
{
"mediaType": "application/vnd.oci.empty.v1+json",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2,
"data": "e30="
}
],
"annotations": {
"org.opencontainers.image.created": "2023-08-11T01:15:52Z"
}
} |
|
Let continue the oras CLI discussion in oras-project/oras#1062 @qweeah. Would like folks to review if doc PR update is ok. /cc @shizhMSFT |
|
I feel that the mix of "blob", "file", "artifact" could confuse users. graph TD
HasBlob{Artifact has at least one file?}
HasConfigData{Artifact has additional metadata config blob?}
Artifact_NoBlobs[Specify <b>artifactType</b>,<br>set config and layers<br>to empty descriptors.]
Artifact_NoConfig[Specify <b>artifactType</b>, set<br>config to empty descriptor, include files in layers.]
Artifact_WithConfig[Specify <b>artifactType</b>,<br> specify config blob and mediaType,<br> include files in layers.]
HasBlob -- No --> Artifact_NoBlobs
HasBlob -- Yes --> HasConfigData
HasConfigData -- Yes --> Artifact_WithConfig
HasConfigData -- No --> Artifact_NoConfig
graph TD
- HasBlob{Artifact has at least<br>one file or blob?}
+ HasBlob{Artifact has at least one file?}
HasConfigData{Artifact has additional<br> metadata config blob?}
Artifact_NoBlobs[Specify <b>artifactType</b>,<br>set config and layers<br>to empty descriptors.]
- Artifact_NoConfig[Specify <b>artifactType</b>, include<br>artifact in layers, set<br>config to empty descriptor.]
+ Artifact_NoConfig[Specify <b>artifactType</b>, set<br>config to empty descriptor, include files in layers.]
- Artifact_WithConfig[Specify <b>artifactType</b>,<br> specify config blob and mediaType,<br> include artifact in layers.]
+ Artifact_WithConfig[Specify <b>artifactType</b>,<br> specify config blob and mediaType,<br> include files in layers.]
HasBlob -- No --> Artifact_NoBlobs
HasBlob -- Yes --> HasConfigData
HasConfigData -- Yes --> Artifact_WithConfig
HasConfigData -- No --> Artifact_NoConfig
|
|
Based on the graph in PR content, this PR proposes that the |
I think that was the consensus for forward looking guidance in opencontainers/image-spec#1101 Encourage new artifact authors to use the |
What if we say "file or blob" everywhere we refer to a layer? That will be consistent with opencontainers/image-spec#1101. |
Co-authored-by: Billy Zha <[email protected]> Signed-off-by: Sajay Antony <[email protected]>
Co-authored-by: Billy Zha <[email protected]> Signed-off-by: Sajay Antony <[email protected]>
Signed-off-by: Sajay Antony <[email protected]>
|
Signed-off-by: Sajay Antony <[email protected]>
|
PTAL @shizhMSFT @FeynmanZhou |
Co-authored-by: Shiwei Zhang <[email protected]> Signed-off-by: Sajay Antony <[email protected]>
As per the OCI call today this is makes the artifact decision much more simpler and we just have to set the artifact type for OCI artifacts.
Thanks to @dasiths
graph TD HasBlob{Artifact has at least<br>one file or blob?} HasConfigData{Artifact has additional<br> metadata config blob?} Artifact_NoBlobs[Specify <b>artifactType</b>,<br>set config and layers<br>to empty descriptors.] Artifact_NoConfig[Specify <b>artifactType</b>, include<br>artifact in layers, set<br>config to empty descriptor.] Artifact_WithConfig[Specify <b>artifactType</b>,<br> specify config blob and mediaType,<br> include artifact in layers.] HasBlob -- No --> Artifact_NoBlobs HasBlob -- Yes --> HasConfigData HasConfigData -- Yes --> Artifact_WithConfig HasConfigData -- No --> Artifact_NoConfig