-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show artifact type when pushing files #1061
Comments
For case 3, should we keep the consistent output format with case 1 and put the artifact type behind the digest? For example, |
Well, original Well, such question proves that proposal 3 is a bad idea. |
I'd like to work on this |
How about only show
|
A follow-up question, should we also display which type of content (layer, config, artifact, etc) has been uploaded in the output? For example:
|
This is over designing. Also CLI don't have context of which type of content is during copying. |
This looks good and echos with the ➜ output oras version
Version: 1.2.0-beta.1
Go version: go1.21.6
Git commit: 9ffdb3eec60b969d842af1a9e699202e0827fa01
Git tree state: clean
➜ output oras push localhost:5000/artifact:output image.tar --format json
✓ Exists application/vnd.oci.empty.v1+json 2/2 B 100.00% 0s
└─ sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
✓ Exists image.tar 9/9 B 100.00% 0s
└─ sha256:8b138a688d47b23d7cc0436b95807a3f74468e8f9ed81974acc0b1b18aa6eb52
✓ Uploaded application/vnd.oci.image.manifest.v1+json 587/587 B 100.00% 23ms
└─ sha256:ff2d22f6d636cec8d11fd1a5ae15606e43989006f479ce7bf3dc78fc26e733f7
{
"Ref": "localhost:5000/artifact@sha256:ff2d22f6d636cec8d11fd1a5ae15606e43989006f479ce7bf3dc78fc26e733f7",
"MediaType": "application/vnd.oci.image.manifest.v1+json",
"Digest": "sha256:ff2d22f6d636cec8d11fd1a5ae15606e43989006f479ce7bf3dc78fc26e733f7",
"Size": 587,
"Annotations": {
"org.opencontainers.image.created": "2024-03-27T02:12:30Z"
},
"ArtifactType": "application/vnd.unknown.artifact.v1"
} |
We still need to output the artifact type for v1.0 artifact since ➜ oras push localhost:5000/artifact:output image.tar --format json --image-spec v1.0
✓ Exists image.tar 9/9 B 100.00% 0s
└─ sha256:8b138a688d47b23d7cc0436b95807a3f74468e8f9ed81974acc0b1b18aa6eb52
✓ Exists application/vnd.unknown.config.v1+json 2/2 B 100.00% 0s
└─ sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
✓ Uploaded application/vnd.oci.image.manifest.v1+json 525/525 B 100.00% 0s
└─ sha256:ea9bd15737d671d50ed929983a73b67524464e4d96481c6d5f9c2bc261a212f3
{
"Ref": "localhost:5000/artifact@sha256:ea9bd15737d671d50ed929983a73b67524464e4d96481c6d5f9c2bc261a212f3",
"MediaType": "application/vnd.oci.image.manifest.v1+json",
"Digest": "sha256:ea9bd15737d671d50ed929983a73b67524464e4d96481c6d5f9c2bc261a212f3",
"Size": 525,
"Annotations": {
"org.opencontainers.image.created": "2024-03-27T02:13:42Z"
},
"ArtifactType": "application/vnd.unknown.config.v1+json"
} Or we need to remove the |
Also, what if config data is provided and $ oras push localhost:5000/artifact:output image.tar --format json --config <(echo -n {}):my/config
✓ Exists my/config 0/0 B 100.00% 0s
└─ sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
✓ Exists image.tar 9/9 B 100.00% 0s
└─ sha256:8b138a688d47b23d7cc0436b95807a3f74468e8f9ed81974acc0b1b18aa6eb52
✓ Uploaded application/vnd.oci.image.manifest.v1+json 496/496 B 100.00% 51ms
└─ sha256:319a41145c336132ab399512081ba7e76bb95dde261bfb399839ee2b3129b9cb
{
"Ref": "localhost:5000/artifact@sha256:319a41145c336132ab399512081ba7e76bb95dde261bfb399839ee2b3129b9cb",
"MediaType": "application/vnd.oci.image.manifest.v1+json",
"Digest": "sha256:319a41145c336132ab399512081ba7e76bb95dde261bfb399839ee2b3129b9cb",
"Size": 496,
"Annotations": {
"org.opencontainers.image.created": "2024-03-27T02:29:20Z"
},
"ArtifactType": ""
} Should we keep this empty |
I'm leaning towards omit if empty. Given that the spec is already in 1.1 and we want to focus on the 1.1 behavior going forward it would be good to just focus on ArtifactType and not auto promote configMediaType to artifactType. If we want to we could show the ConfigMediaType as well. But I don't think its that useful post 1.1 but for legacy artifact it will be. |
(This comment is outdated and current implementation does not have the auto option for Current implementation and behaviors: Display: spec and artifact type behaviors #1317 introduces The spec versions used and the values of Note that there are three highlighted special cases:
|
After revisiting the design, I had a discussion with @wangxiaoxuan273 @qweeah , we should be able to remove Simply speaking, the conclusion will be:
|
What is the version of your ORAS CLI
1.0.1
What would you like to be added?
When #1009 completes, by default
oras push
will build an image manifest withartifactType
set to--artifact-type
. If the flag is not provided, the artifact type will be defaultapplication/vnd.unknown.artifact.v1
.When using
--image-spec v1.0
, the artifact type will be shown in the status of config blob44136fa355b3
When
--image-spec
is not provided or set tov1.1
, the output oforas push
doesn't mentioned the used artifact type.When
--image-spec
is not provided or set tov1.1
, the output oforas push
should contain which artifact type is used to pack the manifest, below are some suggested changes.Or
Or
Are you willing to submit PRs to contribute to this feature?
The text was updated successfully, but these errors were encountered: