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
soci create for any image that produces an index and ztocs
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
Description
/var/lib/soci-snapshotter-grpc/content/index.jsoncontains"manifests":[]where it seems there should be a list of the manifests present in the content store.Steps to reproduce the bug
soci createfor any image that produces an index and ztocscat /var/lib/soci-snapshotter-grpc/content/index.jsonDescribe 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
sociandsoci-snapshotter-grpcwhile they read in each existing manifest.Resolving this situation would allow our existing use of
oci.New()to successfullyloadIndexFileand thengraph.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