Skip to content

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

@sparr

Description

@sparr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions