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

[Bug] content/index.json has empty manifest list #647

Open
sparr opened this issue Jun 2, 2023 · 0 comments · May be fixed by #784
Open

[Bug] content/index.json has empty manifest list #647

sparr opened this issue Jun 2, 2023 · 0 comments · May be fixed by #784
Labels
bug Something isn't working

Comments

@sparr
Copy link
Contributor

sparr commented Jun 2, 2023

Description

/var/lib/soci-snapshotter-grpc/content/index.json contains "manifests":[] where it seems there should be a list of the manifests present in the content store.

Steps to reproduce the bug

  1. soci create for any image that produces an index and ztocs
  2. cat /var/lib/soci-snapshotter-grpc/content/index.json

Describe the results you expected

the newly created index manifest listed in index.json

Host information

N/A

Any additional context or information about the bug

WARNING
Resolving this situation will slightly increase the startup time of soci and soci-snapshotter-grpc while they read in each existing manifest.

Resolving this situation would allow our existing use of oci.New() to successfully loadIndexFile and then graph.IndexAll. Note that the "index" in "index.json" and "IndexFile" relates to the subject of this issue involving a list of manifests, while the "index" in "IndexAll" is a separate concept referring to an internal mapping between manifests and zTOCs.

https://github.com/opencontainers/image-spec/blob/main/image-layout.md#indexjson-file describes the expected contents of this file.

https://pkg.go.dev/oras.land/oras-go/pkg/content#OCI.SaveIndex is the method to export this file after changes have been made to the Store.index

@sparr sparr added the bug Something isn't working label Jun 2, 2023
@sparr sparr self-assigned this Jun 7, 2023
@sparr sparr linked a pull request Aug 14, 2023 that will close this issue
@sparr sparr removed their assignment Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

1 participant