This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Repository navigation
Make {container, layer, image} store APIs private - #1345
Merged
Merged
Conversation
Collaborator
Author
|
(This could go further, making all the methods in the interfaces also package-private, but that would, right now, be a lot of noise that detracts from the core of this PR. That can happen over time, as methods are added/modified.) |
mtrmac
force-pushed
the
private-apis
branch
2 times, most recently
from
September 14, 2022 22:04
1083e15 to
a8fdb56
Compare
Collaborator
Author
Actually #1346 would end up doing that, if we accept the idea of lock ownership tokens. |
mtrmac
force-pushed
the
private-apis
branch
from
September 30, 2022 20:46
a8fdb56 to
12a9282
Compare
Member
|
LGTM |
Member
Member
|
@mtrmac needs a rebase. Then I think we should get this in. |
rhatdan
approved these changes
Oct 9, 2022
Member
flouthoc
approved these changes
Oct 10, 2022
flouthoc
left a comment
Collaborator
There was a problem hiding this comment.
LGTM @nalind @giuseppe @vrothberg PTAL
... to reduce duplication of read implementations of Store. This can almost certainly be simplified further; this is enough for the purposes of this PR, where we want to decrease the number of callers that need to be updated. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
…e private It is not directly reachable by any public API, and there are no known external users. So, make it obviously private to make it easier to change the returned interface in the future. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
…vate There is no public way to obtain implementations of these interfaces; so replace the public interfaces with private ones, to make it clear that we _can_ modify them. For formal API compatibility, preserve the old interface definitions as copies. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
c/storage currently exports
ContainerStore,ImageStore,LayerStore, and several component interfaces, publicly.Meanwhile there are no public ways to obtain implementations of these interfaces (and no non-public callers in Podman or CRI-O that I can find); and the public interfaces at least look like an impediment to changing the C/I/L store interfaces (e.g. to change locking).
To clarify that, make the used C/I/L store implementations private (and keep the public interfaces in
deprecated.gopurely for formal API compatibility).Then, as a proof of concept, remove unused
RecursiveLock(compare #1344),LoadLocked, andLookupmethods.@nalind RFC. I might well be missing something about external users of these interfaces.
Cc: @vrothberg for the
RecursiveLockmethod removal, along with #1344.See individual commit messages for details.