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

Populate content/index.json manifest list #784

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sparr
Copy link
Contributor

@sparr sparr commented Aug 14, 2023

Issue #, if available:
Closes #647

Description of changes:
Tag newly Pushed content in the soci content store, then do SaveIndex after performing content store operations to enumerate tagged content in content/index.json's manifests array.

Testing performed:
Existing unit and integration tests.
Manual creation of an index and check for a populated manifests array.
Needs new tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +148 to +149
// FIXME: This runs far too soon. Writing index.json for the soci content store should happen after each change to the store and/or when the snapshotter shuts down.
defer done(ctx)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other cases are single CLI commands which perform some operation then clean up after themselves. Here we are creating the filesystem for the snapshotter which will be used for an indefinite period. This done should happen when the filesystem is closed, probably when the snapshotter is exiting. An equivalent operation (which wouldn't really be "done") may also be needed after each new content creation. Either or both of these options would require putting the function into the filesystem struct (or somewhere else persistent) to be called later.

I am seeking input on the desirable path forward here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This operation could be moved into Push but would then happen far more often than is reasonable for sequential operations.

Signed-off-by: Clarence "Sparr" Risher <[email protected]>
@sparr sparr force-pushed the 647_enumerate_manifests_in_content_index_json branch from 9b3e9f6 to 8413676 Compare August 14, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] content/index.json has empty manifest list
1 participant