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

--artifact-type support in oras push #466

Closed
shizhMSFT opened this issue Aug 1, 2022 · 11 comments · Fixed by #483
Closed

--artifact-type support in oras push #466

shizhMSFT opened this issue Aug 1, 2022 · 11 comments · Fixed by #483
Assignees
Labels
breaking change Public API changes
Milestone

Comments

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Aug 1, 2022

This proposal contains two changes derived from #361.

  1. When --artifact-type $type is specified, oras push will change the media type of the config blob, which is equivalent to --manifest-config <(echo {}):$type
  2. When there is no blob specified, --artifact-type must be specified and an ORAS artifact manifest will be pushed.
@shizhMSFT shizhMSFT added the breaking change Public API changes label Aug 1, 2022
@shizhMSFT shizhMSFT added this to the v0.14.0 milestone Aug 1, 2022
@sajayantony
Copy link
Contributor

Could we do a zero byte blob for this?

@shizhMSFT
Copy link
Contributor Author

shizhMSFT commented Aug 2, 2022

Could we do a zero byte blob for this?

We are still not sure if a zero-byte config blob is allowed and supported for all registries.

@shizhMSFT
Copy link
Contributor Author

BTW, even if we have a zero-byte blob, we still need to upload that empty blob.

@yuehaoliang
Copy link
Contributor

Hi, team! I'll start to work on resolving this issue.

@sajayantony
Copy link
Contributor

Yes zero byte blobs need to be uploaded but you can choose to short circuit it on the pull path.
Also registry implementation may also choose to short circuit the writes.

@sajayantony
Copy link
Contributor

Thinking more have we considered using --config-media-type and --artifact-type to disambiguate between them.
This way there is no guess work on the CLI and the flags are mutually exclusive since artifactManifest does not have a config media type.

@shizhMSFT
Copy link
Contributor Author

Thinking more have we considered using --config-media-type and --artifact-type to disambiguate between them. This way there is no guess work on the CLI and the flags are mutually exclusive since artifactManifest does not have a config media type.

I think here is to make the concept of artifact type transparent. Currently, we use OCI manifest to mimic ORAS artifact manifest where the config media type is used as artifact type. In the future when ORAS artifact manifest is widely adopted, we can default oras push to ORAS artifact manifest without interface changes.

@yuehaoliang
Copy link
Contributor

yuehaoliang commented Aug 9, 2022

I made a mistake to handle PR #483, as I clicked the Github UI "sync fork" to fetch upstream in my repo/branch. Since that PR was created from my repo/branch, after my repo/branch was updated to upstream, that PR was automatedly discarded.

@shizhMSFT
Copy link
Contributor Author

Closing this as #482 is merged and #486 is closed.

@SteveLasker
Copy link
Contributor

Would like to make sure we’re in sync on the UX and experience before closing.

@SteveLasker SteveLasker reopened this Aug 12, 2022
@shizhMSFT
Copy link
Contributor Author

Closing again as oras-project/oras-go#271 is planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment