-
Notifications
You must be signed in to change notification settings - Fork 793
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
imagebuildah: Support custom image reference lookup for cache push/pull #5532
imagebuildah: Support custom image reference lookup for cache push/pull #5532
Conversation
Ephemeral COPR build failed. @containers/packit-build please check. |
Please add tests. |
I think this is a tricky thing to construct a test for since it requires pushing cache to/from a registry. The integration tests do this, but they use a real buildah binary that doesn't use these options. I saw there is a One option would be to add hidden flags to the |
No after looking at the PR more closely, I think we can let it in without tests. |
Cool, are there any other changes you'd like here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just randomly passing by and I am expressing no opinion on the cost/benefit of adding these indirections.
53d0571
to
7d61a74
Compare
This allows callers to provide custom SourceLookupReferenceFunc and DestinationLookupReferenceFunc for cache pull/push. These can be used to implement custom blob caches, and to wrap the reference being pushed/pulled to influence the copy behavior. Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
7d61a74
to
7ff83d5
Compare
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
b25c968
to
9521672
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Implementation LGTM. I’ll let others decide about the cost/benefit of the feature.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aaronlehmann, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We are going to have to revert this PR. We should not have let libimage leak into the buildah/define directory. This forces podman-remote to grow hugely in size. We should define these functions in a directory other then define/ and then pass them into the executor. |
What type of PR is this?
/kind api-change
What this PR does / why we need it:
This allows callers to provide custom
SourceLookupReferenceFunc
andDestinationLookupReferenceFunc
for cache pull/push. These can be used to implement custom blob caches, and to wrap the reference being pushed/pulled to influence the copy behavior.How to verify it
Verification isn't really necessary since this is just plumbing through functions for other code calling into buildah, but one could write a test program that embeds buildah and supplies its own funcs here.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
n/a
Does this PR introduce a user-facing change?
None