oras
oras copied to clipboard
`--artifact-type` support in `oras push`
This proposal contains two changes derived from #361.
- 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
- When there is no blob specified,
--artifact-type
must be specified and an ORAS artifact manifest will be pushed.
Could we do a zero byte blob for this?
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.
BTW, even if we have a zero-byte blob, we still need to upload that empty blob.
Hi, team! I'll start to work on resolving this issue.
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.
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.
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.
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.
Closing this as #482 is merged and #486 is closed.
Would like to make sure we’re in sync on the UX and experience before closing.
Closing again as https://github.com/oras-project/oras-go/issues/271 is planned.