-
Notifications
You must be signed in to change notification settings - Fork 3
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
empty_config_descriptor doesn't create an empty descriptor #27
Comments
Well ideally we would use the typestate pattern and have
because the type system wouldn't allow you to forget to set an actual valid config. Implementing my previous comment:
would be counterproductive because we would then have to delete the empty descriptor when the user would replace the config with its own. |
I think that one snowballs in general to youki-dev/oci-spec-rs#242 right?
Eh, if we "leak" an empty config descriptor by default that doesn't seem like a big deal. In the general case we need GC (which we don't implement here yet). |
Ok, then short-term I will implement the solution which writes the empty config into |
…riptor The empty descriptor is described in the image spec [1]. `new_empty_manifest` writes an empty config descriptor in the blobs directory, which results in a valid image layout specification. This is validated using the fsck function in the `test_new_empty_manifest` test. Fixes containers#27 [1] https://github.com/opencontainers/image-spec/blob/main/manifest.md#guidance-for-an-empty-descriptor Signed-off-by: Ariel Miculas-Trif <[email protected]>
The empty descriptor is described in the image manifest doc.
I suggest we change the
new_empty_manifest
function to return a manifest with an empty config and to changeempty_config_descriptor
to create an empty config.It would look something like get_empty_manifest from PuzzleFS. One caveat is that we need to write the actual empty descriptor in the
sha256/blobs
directory, otherwise other tools complain about the OCI dir structure integrity (e.g. skopeo), since all the blobs referenced from the metadata must exist on the disk.The text was updated successfully, but these errors were encountered: