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

Prep for multiple container image stores #695

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

jeckersb
Copy link
Contributor

@jeckersb jeckersb commented Jul 16, 2024

For now, this is effectively a no-op as it only implements a store for
the current ostree container implementation.

Beyond some minor code movement and plumbing, this also only handles
the store implementation backing the bootc status command.
Additional image store functionality (check, pull, delete, etc.) will
be added in future changes in order to keep things smaller and more
manageable.

@jeckersb
Copy link
Contributor Author

Rough draft of how I envision this might work. One notable thing is that this version does not use async at all, however I expect that will probably become necessary when we add future backends (it started to creep in over in #215). Things were starting to get unwieldy here with async because of things like Deployment being both !Send and !Sync so it'd require a bit more iterating on to get right. But the existing backend doesn't currently need it so this works for a minimal example.

lib/src/backend/mod.rs Outdated Show resolved Hide resolved
lib/src/backend/mod.rs Outdated Show resolved Hide resolved
lib/src/backend/mod.rs Outdated Show resolved Hide resolved
@jeckersb jeckersb force-pushed the backend_v2 branch 2 times, most recently from 0c57786 to 5bbc98d Compare July 23, 2024 18:45
@jeckersb jeckersb changed the title WIP prep for multiple backends Prep for multiple container image stores Jul 23, 2024
@jeckersb
Copy link
Contributor Author

Notable changes since last version:

  • General renaming of things from "backend" to "store" or some variation thereof, mostly to align with ostree_ext::container::store. Plus I think "image store" is more reflective of what this actually is.
  • Added store::Storage struct which wraps SysrootLock and a ContainerImageStoreImpl re: previous feedback. This also is Deref for SysrootLock so we don't have to change that absolutely everywhere.
  • spec::BootEntry now has a store field so we can expose it in the host status
  • Added store::load re: previous feedback and removed store implementations for things other than Deployment. Folded the origin bits under Deployment.

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Overall looks sane to me!

For now, this is effectively a no-op as it only implements a store for
the current ostree container implementation.

Beyond some minor code movement and plumbing, this also only handles
the store implementation backing the `bootc status` command.
Additional image store functionality (check, pull, delete, etc.) will
be added in future changes in order to keep things smaller and more
manageable.

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@jeckersb
Copy link
Contributor Author

Ok, rebased, added the alias, and added a test.

@jeckersb jeckersb marked this pull request as ready for review July 24, 2024 14:49
@jeckersb jeckersb merged commit bc28c59 into containers:main Jul 24, 2024
24 of 28 checks passed
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.

2 participants