You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sajayantony To align oras's behavior with this subtree, do we need to ban --config if no file specified in below scenario?
I think we can warn since this is guidance and not a MUST in the specification.
The above example has a config file but no blob and that is not a scenario that cannot be executed but not recommended.
Also we probably need to consider how to enable the user to pass in the config mediaType and also artifact-type.
❯ oras push --config config.json:application/example.config+json localhost:5000/oras-test:push1 --artifact-type application/example
Error: --artifact-type and --config cannot both be provided
Why is this needed for ORAS?
Updated support for v1.1
Are you willing to submit PRs to contribute to this feature?
Also in the diagram of Deciding on artifactType or config.mediaType, there is no recommendation of not specifying artifactType, but it's doable via oras push --config, I suggest ORAS CLI to give warning on that usage so user is aware they are not producing sth recommended.
Also we probably need to consider how to enable the user to pass in the config mediaType and also artifact-type.
@sajayantony This change will be covered in #1043, when using --image-spec v1.1 (also it's by default), both flags can be used.
Both --config mediaType and --artifact-type will be allowed to use together in oras push in ORAS v1.1.0-rc.2. I will document the behavior in the compatibility mode.md to align with the image spec v1.1.0-rc4.
Specify artifactType, specify config blob and mediaType, include artifact in layers. (where artifacts are empty)
This is not accurate, according to current latest version of the guide, if there is no layer blob, the config descriptor must be empty and artifactType must be presented, which is not enforced in oras CLI now.
This is not accurate, according to current latest version of the guide, if there is no layer blob, the config descriptor must be empty and artifactType must be presented, which is not enforced in oras CLI now.
I think config blob is considered as a blob, isn't it? The guide does not state whether it is a layer blob or a config blob but a blob.
Activity
qweeah commentedon Aug 11, 2023
Also in the diagram of
Deciding on artifactType or config.mediaType, there is no recommendation of not specifyingartifactType, but it's doable viaoras push --config, I suggest ORAS CLI to give warning on that usage so user is aware they are not producing sth recommended.qweeah commentedon Aug 11, 2023
@sajayantony This change will be covered in #1043, when using
--image-spec v1.1(also it's by default), both flags can be used.FeynmanZhou commentedon Aug 11, 2023
Both
--config mediaTypeand--artifact-typewill be allowed to use together inoras pushin ORAS v1.1.0-rc.2. I will document the behavior in the compatibility mode.md to align with the image spec v1.1.0-rc4.shizhMSFT commentedon Aug 16, 2023
What if an artifact has a config but no layers?
{ "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.example.config.v1+json", "digest": "sha256:5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03", "size": 123 }, "layers": [ { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2 } ] }It is technically possible but this path is currently not in the decision tree.
shizhMSFT commentedon Aug 16, 2023
Oh. The decision tree actually covers it.
qweeah commentedon Aug 16, 2023
This is not accurate, according to current latest version of the guide, if there is no layer blob, the config descriptor must be empty and
artifactTypemust be presented, which is not enforced in oras CLI now.shizhMSFT commentedon Aug 16, 2023
I think config blob is considered as a blob, isn't it? The guide does not state whether it is a layer blob or a config blob but a blob.
qweeah commentedon Aug 16, 2023
No, the guide explicitly callout config blob as
ConfigDatashizhMSFT commentedon Aug 16, 2023
LoL.
ConfigDatais just a variable to render the flowchart. BTW, you may also want to checkout opencontainers/image-spec#1101qweeah commentedon Aug 16, 2023
Well, oras should allow
--configwithout file layer specified if there is no spec disallowing it.