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

Export constants for "blobs" and "index.json" #1069

Closed
sparr opened this issue May 31, 2023 · 0 comments · Fixed by #1071
Closed

Export constants for "blobs" and "index.json" #1069

sparr opened this issue May 31, 2023 · 0 comments · Fixed by #1071

Comments

@sparr
Copy link
Contributor

sparr commented May 31, 2023

ImageLayoutFile = "oci-layout"
exports a constant for "oci-layout" but there seems to be no export anywhere in the package for the "blobs" or "index.json" which are the other two path names needed to implement https://github.com/opencontainers/image-spec/blob/main/image-layout.md. These strings are hard coded into outside implementations like https://github.com/moby/buildkit/blob/60d134bf7671e60bf2a2b9bc41a1d856e6ef396e/client/ociindex/ociindex.go#L16 and https://github.com/oras-project/oras-go/blob/v2.1.0/content/oci/oci.go#L41-L44

This issue is a request for some part of this repo to export those two constants so they can be used consistently across other projects relying on this spec.

TerryHowe pushed a commit to oras-project/oras-go that referenced this issue Jun 25, 2023
https://github.com/opencontainers/image-spec/blob/v1.0/image-layout.md#content
specifies that the blobs dir must exist, so the changed ensureDir in
this PR is a bugfix.

The addition and use of the ociBlobsDir constant is more of a cleanup
suggestion, and I can remove it if necessary. I've also asked for it to
be added upstream at
opencontainers/image-spec#1069 but that will
probably take significantly longer.

Signed-off-by: Clarence "Sparr" Risher <clrnc@amazon.com>
Wwwsylvia pushed a commit to Wwwsylvia/oras-go that referenced this issue Jul 4, 2023
…roject#520)

https://github.com/opencontainers/image-spec/blob/v1.0/image-layout.md#content
specifies that the blobs dir must exist, so the changed ensureDir in
this PR is a bugfix.

The addition and use of the ociBlobsDir constant is more of a cleanup
suggestion, and I can remove it if necessary. I've also asked for it to
be added upstream at
opencontainers/image-spec#1069 but that will
probably take significantly longer.

Signed-off-by: Clarence "Sparr" Risher <clrnc@amazon.com>
shizhMSFT pushed a commit to oras-project/oras-go that referenced this issue Jul 4, 2023
https://github.com/opencontainers/image-spec/blob/v1.0/image-layout.md#content
specifies that the blobs dir must exist, so the changed ensureDir in
this PR is a bugfix.

The addition and use of the ociBlobsDir constant is more of a cleanup
suggestion, and I can remove it if necessary. I've also asked for it to
be added upstream at
opencontainers/image-spec#1069 but that will
probably take significantly longer.

Signed-off-by: Clarence "Sparr" Risher <clrnc@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant