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

docs: add GAR #184

Merged
merged 1 commit into from
Oct 2, 2020
Merged

docs: add GAR #184

merged 1 commit into from
Oct 2, 2020

Conversation

hideto0710
Copy link
Contributor

Adds a reference to GAR support.

Closes #157

@ghost
Copy link

ghost commented Oct 1, 2020

CLA assistant check
All CLA requirements met.

@jdolitsky
Copy link
Contributor

cc @jonjohnsonjr - does this look good for merge?

@jonjohnsonjr
Copy link

Content LGTM, but do you mind waiting a until tomorrow to merge? My fix still hasn't rolled out to a couple regions, so I don't want to claim support quite yet.

Thanks Hideto!


```sh
oras push ${REGION}-docker.pkg.dev/${GCP_PROJECT}/samples/artifact:1.0 \
./artifact.txt:application/vnd.unknown.layer.v1+txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonjohnsonjr @jdolitsky
Google Artifact Registry does not support config as /dev/null, right?
I tested json, yaml and plain text, thease worked.
Should I add a comment for that specification?

$ oras push ${REGION}-docker.pkg.dev/${GCP_PROJECT}/samples/artifact:1.1 \
>     --manifest-config /dev/null:application/vnd.unknown.config.v1+json \
>     ./artifact.txt:application/vnd.unknown.layer.v1+txt
Uploading fe1c9c56450d artifact.txt
Error: failed commit on ref "unknown-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855": unexpected status: 400 Bad Request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This REQUIRED property references a configuration object for a container, by digest. Beyond the descriptor requirements, ...

From the descriptor requirements:

The following fields contain the primary properties that constitute a Descriptor:

mediaType string

This REQUIRED property contains the media type of the referenced content. Values MUST comply with RFC 6838, including the naming requirements in its section 4.2.

The OCI image specification defines several of its own MIME types for resources defined in the specification.

digest string

This REQUIRED property is the digest of the targeted content, conforming to the requirements outlined in Digests. Retrieved content SHOULD be verified against this digest when consumed via untrusted sources.

size int64

This REQUIRED property specifies the size, in bytes, of the raw content. This property exists so that a client will have an expected size for the content before processing. If the length of the retrieved content does not match the specified length, the content SHOULD NOT be trusted.

As such, this section of the oras description seems to be out of compliance with the spec, from my reading:

Since oras does not make use of the configuration object, an empty JSON object {} is used by default when pushing, and never being fetched when pulling.

@jonjohnsonjr
Copy link

do you mind waiting a until tomorrow to merge?

This should be good to go now.

@jdolitsky jdolitsky merged commit 6414398 into oras-project:master Oct 2, 2020
@hideto0710 hideto0710 deleted the gar_docs branch October 5, 2020 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google Artifact Registry Support
3 participants