Skip to content
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

feature request: verbose output of tagging #618

Closed
shizhMSFT opened this issue Sep 24, 2022 · 9 comments · Fixed by #853
Closed

feature request: verbose output of tagging #618

shizhMSFT opened this issue Sep 24, 2022 · 9 comments · Fixed by #853
Assignees
Labels
enhancement New feature or request ux User experience related
Milestone

Comments

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Sep 24, 2022

The current UX for tagging is a bit loss. For instances:

% oras tag ${name}:latest 2.12.1 2.12 2
Tagged 2
Tagged 2.12.1
Tagged 2.12

and

% oras manifest push ${name}:latest,2.12,2.12.1,2 manifest.json
Pushed ******.azurecr.io/mac/hello:latest
Tagged 2.12
Tagged 2.12.1
Tagged 2
Digest: sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a

It is better to have something like

% oras tag -v ${name}:latest 2.12.1 2.12 2
Tagged ******.azurecr.io/mac/hello:latest <= 2
Tagged ******.azurecr.io/mac/hello:latest <= 2.12.1
Tagged ******.azurecr.io/mac/hello:latest <= 2.12

or

% oras tag -v ${name}:latest 2.12.1 2.12 2
Tagged latest <= 2
Tagged latest <= 2.12.1
Tagged latest <= 2.12

or

% oras tag -v ${name}:latest 2.12.1 2.12 2
Tagged sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a <= 2
Tagged sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a <= 2.12.1
Tagged sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a <= 2.12
@shizhMSFT shizhMSFT added enhancement New feature or request ux User experience related labels Sep 24, 2022
@shizhMSFT shizhMSFT added this to the v0.16.0 milestone Sep 24, 2022
@shizhMSFT shizhMSFT changed the title feature requestl: verbose output of tagging feature request: verbose output of tagging Sep 24, 2022
@FeynmanZhou FeynmanZhou moved this to Todo in ORAS-Planning Sep 26, 2022
@FeynmanZhou
Copy link
Member

FeynmanZhou commented Nov 3, 2022

@shizhMSFT
I would propose adding Date, Digest, and Size when users verbose output of tagging a manifest, see the following example:

$ oras tag -v ${registry}/${repo}:latest 2.12.1 2.12 2
2022/11/03 07:54:11 Tagged ${registry}/${repo}:2.12.1, digest: sha256:aaaaa, size: 123
2022/11/03 07:54:12 Tagged ${registry}/${repo}:2.12.2, digest: sha256:bbbb, size: 456

cc @qweeah @yizha1 @oras-project/oras-maintainers

@shizhMSFT
Copy link
Contributor Author

@shizhMSFT I would propose adding Date, Digest, and Size when users verbose output of tagging a manifest, see the following example:

$ oras tag -v ${registry}/${repo}:latest 2.12.1 2.12 2
2022/11/03 07:54:11 Tagged ${registry}/${repo}:2.12.1, digest: sha256:aaaaa, size: 123
2022/11/03 07:54:12 Tagged ${registry}/${repo}:2.12.2, digest: sha256:bbbb, size: 456

cc @qweeah @yizha1 @oras-project/oras-maintainers

Adding date, digest, size will make the UX of oras tags inconsistent with other commands. Hence, I'm against it.

@yizha1 yizha1 modified the milestones: v0.16.0, v1.0.0-rc.1 Nov 7, 2022
@FeynmanZhou FeynmanZhou modified the milestones: v1.0.0-rc.1, v1.0.0 Jan 3, 2023
@qweeah
Copy link
Contributor

qweeah commented Feb 17, 2023

Some ideas on the UX:

  • Adding digest value to tagging logs is undoubtable necessary. The to-be-determined part is how should the digest be presented with the tag? My personal preference is printing the digest of target image before tagging logs. Because reprinting digest shows duplicated information, which is unnecessary. See below:

    $ oras tag ${name}:latest 2.12.1 2.12 2
    Tagged 2.12
    Tagged 2
    Tagged 2.12.1
    Done tagging [${TARGET_TYPE}] ${name}@sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a
    

    For oras push and oras cp, we can add above logs right after push/copy logs.

  • it's unnecessary to add date to tagging logs since user will only need this kind of information only when debugging/troubleshooting. It's more accurate to refer to debug logs with -d set.

  • it's unnecessary to add size into tagging logs. Maybe it's related to push or copy command but I didn't see any valid use case to get that property from tagging logs.

@FeynmanZhou
Copy link
Member

FeynmanZhou commented Feb 27, 2023

Agree with @qweeah . It's not necessary to include size and date in the output.

@wangxiaoxuan273
Copy link
Contributor

I would like to work on this item.

@qweeah
Copy link
Contributor

qweeah commented Mar 2, 2023

Suggested UX:

# oras tag
oras tag ${name}:latest 2.12.1 2.12 2
Tagging [${TARGET_TYPE}] ${name}@sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a
Tagged 2.12
Tagged 2
Tagged 2.12.1

# oras push
oras push ${name}:latest,2.12.1,2.12,2
Preparing foobar/bar
Uploading fcde2b2edba5 foobar/bar
Uploaded  fcde2b2edba5 foobar/bar
Uploading c2844d9e1aa3 application/vnd.oci.artifact.manifest.v1+json
Uploaded  c2844d9e1aa3 application/vnd.oci.artifact.manifest.v1+json
Pushed [registry] ${name}:latest
Tagged 2.12
Tagged 2
Tagged 2.12.1
Digest: sha256:c2844d9e1aa3d42a683ed8b823a12de2510d38ef4d700c2a5e9769426e39b63d

# oras copy
oras cp ${name1}:latest ${name2}:latest,2.12.1,2.12,2
Copying ae2d56717c93 signature
Copying 44136fa355b3 test.signature.file
Copied  ae2d56717c93 signature
Copying 44136fa355b3 test.sbom.file
Copying f5d51c0823fc sbom
Copied  44136fa355b3 test.sbom.file
Copied  44136fa355b3 test.signature.file
Copying 2c26b46b68ff foo1
Exists  44136fa355b3 application/vnd.unknown.config.v1+json
Copying fcde2b2edba5 bar
Copied  f5d51c0823fc sbom
Copied  2c26b46b68ff foo1
Copied  fcde2b2edba5 bar
Copying fd6ed2f36b54 application/vnd.oci.image.manifest.v1+json
Skipped 2c26b46b68ff foo2
Copied  fd6ed2f36b54 application/vnd.oci.image.manifest.v1+json
Copied [registry] {name1}@sha256:fd6ed2f36b5465244d5dc86cb4e7df0ab8a9d24adc57825099f522fe009a22bb => [registry] {name2}@sha256:fd6ed2f36b5465244d5dc86cb4e7df0ab8a9d24adc57825099f522fe009a22bb
Tagged 2.12
Tagged 2
Tagged 2.12.1
Digest: sha256:fd6ed2f36b5465244d5dc86cb4e7df0ab8a9d24adc57825099f522fe009a22bb

@shizhMSFT
Copy link
Contributor Author

It is unnecessary to print duplicated digest for oras push and oras copy.

For oras tag, it would be better to have the digest before the tags.

% oras tag ${name}:latest 2.12.1 2.12 2
Tagging [${TARGET_TYPE}] ${name}@sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a
Tagged 2.12
Tagged 2
Tagged 2.12.1

@qweeah
Copy link
Contributor

qweeah commented Mar 2, 2023

It is unnecessary to print duplicated digest for oras push and oras copy.

For oras tag, it would be better to have the digest before the tags.

% oras tag ${name}:latest 2.12.1 2.12 2
Tagging [${TARGET_TYPE}] ${name}@sha256:fb12d4ce3b48eb37cded0ff91079cd7255740bdbf1c7a05014ed4481fa0d13a
Tagged 2.12
Tagged 2
Tagged 2.12.1

updated inline

@FeynmanZhou
Copy link
Member

@qweeah It looks fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux User experience related
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants