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

pushing with multiple tags will corrupt --format xxx output #1300

Closed
1 task done
qweeah opened this issue Mar 20, 2024 · 2 comments · Fixed by #1302 or #1381
Closed
1 task done

pushing with multiple tags will corrupt --format xxx output #1300

qweeah opened this issue Mar 20, 2024 · 2 comments · Fixed by #1302 or #1381
Assignees
Labels
bug Something isn't working
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Mar 20, 2024

What happened in your environment?

I want to

  1. push an artifact to localhost:5000/test with tag v1.1
  2. tag the pushed artifact with latest and v1
$ oras push localhost:5000/test:v1.1,v1,latest --format {{.Ref}} --no-tty 
Tagged latest
Tagged v1
localhost:5000/test@sha256:0e0e404fe40f2409b1964272434fbe3b9293f262fd62f90ab9df49d54579818e

The output contains both tagging log and digest reference of pushed artifact.

What did you expect to happen?

The output should only contain digest reference of pushed artifact.

$ oras push localhost:5000/test:v1.1,v1,latest --format {{.Ref}} --no-tty 
localhost:5000/test@sha256:0e0e404fe40f2409b1964272434fbe3b9293f262fd62f90ab9df49d54579818e

How can we reproduce it?

Run below command with oras v1.2.0-beta.1 registry running at port 5000:

oras push localhost:5000/test:v1.1,v1,latest --format {{.Ref}} --no-tty 

What is the version of your ORAS CLI?

v1.2.0-beta.1

What is your OS environment?

ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.
@qweeah qweeah added bug Something isn't working triage New issues or PRs to be acknowledged by maintainers labels Mar 20, 2024
@qweeah qweeah added this to the v1.2.0 milestone Mar 20, 2024
@qweeah qweeah self-assigned this Mar 20, 2024
@sajayantony
Copy link
Contributor

This also appears when --no-tty is specified

❯ oras push localhost:5000/test:v1.1,v1,latest --format json  --no-tty
Tagged latest
Tagged v1
{
  "Ref": "localhost:5000/test@sha256:66155c4c560fde88581530eb81bd7e38ca8ceb9217b19931337a1526f8af24a3",
  "MediaType": "application/vnd.oci.image.manifest.v1+json",
  "Digest": "sha256:66155c4c560fde88581530eb81bd7e38ca8ceb9217b19931337a1526f8af24a3",
  "Size": 535,
  "Annotations": {
    "org.opencontainers.image.created": "2024-03-21T01:42:33Z"
  },
  "ArtifactType": "application/vnd.unknown.artifact.v1"
}

@qweeah
Copy link
Contributor Author

qweeah commented Mar 21, 2024

@sajayantony Tagged xxx is not part of terminal output and is expected to appear even with --no-tty.

@shizhMSFT shizhMSFT removed the triage New issues or PRs to be acknowledged by maintainers label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants