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

[FEATURE] Allow CLI to discover soci artifacts that it doesn't create #30

Closed
Kern-- opened this issue Aug 19, 2022 · 0 comments · Fixed by #527
Closed

[FEATURE] Allow CLI to discover soci artifacts that it doesn't create #30

Kern-- opened this issue Aug 19, 2022 · 0 comments · Fixed by #527
Assignees
Labels
stability Decreases the likelihood for introducing bugs

Comments

@Kern--
Copy link
Contributor

Kern-- commented Aug 19, 2022

Is your feature request related to a problem? Please describe.
Currently, soci uses a bbolt metadata DB as its source of truth about what SOCI artifacts exist locally. This DB is only updated by soci create. That means that any indices/ztocs that are added to the store outside of the soci create command are invisible to the inspection tools provided by soci (e.g. soci index list will not see an index pulled with soci rpull).

Describe the solution you'd like
I would like to see a command like:

soci rebuild-db

which would rediscover all of the soci artifacts in the local storage and add the necessary metadata to the db.

Describe alternatives you've considered
One alternative would be to have the snapshotter update the local DB when it pulls SOCI artifacts. There are a couple of downsides to this approach:

  1. SOCI artifacts could be deleted outside of either soci or the soci snapshotter which would require a rebuild-like command to avoid a full purge.
  2. bbolt locks the DB file while a process is interacting with it. If the soci snapshotter opens the DB at launch, then it must not be running when soci is invoked. If the soci snapshotter opens/closes the DB around each artifact fetch, then it may see an unacceptable performance hit.

The second issue could be solved by having the snapshotter own the metadata DB and expose a gRPC (or similar) service that the soci command could interact with. This has the downside that the snapshotter is required to be running in order to build SOCI artifacts which is not desirable in cases like a managed index builder where the images will never be run locally.

Additional context
Add any other context or screenshots about the feature request here.

@Kern-- Kern-- added the stability Decreases the likelihood for introducing bugs label Dec 13, 2022
@turan18 turan18 self-assigned this Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stability Decreases the likelihood for introducing bugs
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants