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

Replace libimage.LookupReferenceFunc with the manifests version #5628

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

nalind
Copy link
Member

@nalind nalind commented Jul 15, 2024

What type of PR is this?

/kind api-change

What this PR does / why we need it:

Change fields of the github.com/containers/common/libimage.LookupReferenceFunc type to be of the github.com/containers/common/libimage/manifests.LookupReferenceFunc type. The two types are aliases for each other, but the libimage package refuses to build when podman is using us as a dependency of its remote client.

Note that the CachePullSourceLookupReferenceFunc, CachePullDestinationLookupReferenceFunc, CachePushSourceLookupReferenceFunc, and CachePushDestinationLookupReferenceFunc callbacks in define.BuildOptions aren't currently proxied for podman remote clients.

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

Alternate approaches include moving the type aliases from copier.go in github.com/containers/common/libimage to a new file that doesn't have build constraints, or having podman actually define its own API types instead of just including ours.

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API approved labels Jul 15, 2024
@nalind nalind force-pushed the lookup-func-aliases branch 2 times, most recently from 32714bb to ebad106 Compare July 15, 2024 14:14
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@rhatdan
Copy link
Member

rhatdan commented Jul 15, 2024

LGTM if this works.

@nalind
Copy link
Member Author

nalind commented Jul 15, 2024

Shouldn't be needed with containers/common#2089, closing.

@nalind nalind closed this Jul 15, 2024
@nalind nalind deleted the lookup-func-aliases branch July 15, 2024 15:16
@nalind nalind restored the lookup-func-aliases branch July 15, 2024 15:23
@nalind nalind reopened this Jul 15, 2024
@nalind nalind force-pushed the lookup-func-aliases branch from ebad106 to 49590a8 Compare July 15, 2024 15:52
@nalind
Copy link
Member Author

nalind commented Jul 15, 2024

Reopened and rebased.

@rhatdan
Copy link
Member

rhatdan commented Jul 15, 2024

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Jul 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, nalind

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Change fields of the
github.com/containers/common/libimage.LookupReferenceFunc type to be of
the github.com/containers/common/libimage/manifests.LookupReferenceFunc
type. The two types are aliases for each other, but the libimage package
refuses to build when podman is using us as a dependency of its remote
client.

Note that the CachePullSourceLookupReferenceFunc,
CachePullDestinationLookupReferenceFunc,
CachePushSourceLookupReferenceFunc, and
CachePushDestinationLookupReferenceFunc callbacks in define.BuildOptions
aren't currently proxied for podman remote clients.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@nalind nalind force-pushed the lookup-func-aliases branch from 49590a8 to b1dff41 Compare July 15, 2024 20:30
@rhatdan
Copy link
Member

rhatdan commented Jul 15, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 15, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 750598d into containers:main Jul 16, 2024
35 of 36 checks passed
@nalind nalind deleted the lookup-func-aliases branch July 16, 2024 15:10
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants