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

image: replace GetStoreImage with ResolveReference and bump c/image to 373c52a9466f #5129

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Nov 1, 2023

GetStoreImage is deprecated after containers/image#2056, similar to PR: containers/podman#20560

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake
/kind other

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

vendor: bump `c/image` to `373c52a9466f`

Copy link
Contributor

openshift-ci bot commented Nov 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

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

@openshift-ci openshift-ci bot added the approved label Nov 1, 2023
@flouthoc flouthoc force-pushed the bump-c-image branch 2 times, most recently from 7ad72a5 to d6eb72b Compare November 2, 2023 03:29
@flouthoc flouthoc changed the title vendor: bump c/image to 373c52a9466f image: replace GetStoreImage with ResolveReference and bump c/image to 373c52a9466f Nov 2, 2023
@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 2, 2023

@containers/buildah-maintainers @giuseppe @vrothberg PTAL

@rhatdan
Copy link
Member

rhatdan commented Nov 2, 2023

LGTM

@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 2, 2023

Rebased.

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

ACK overall, it seems that the surrounding code really has no use for the other return value.

commit.go Outdated Show resolved Hide resolved
commit.go Outdated Show resolved Hide resolved
commit.go Outdated Show resolved Hide resolved
@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 2, 2023

@mtrmac @nalind PTAL I think now patch implements #5129 (comment) and removes the need for error matching.

commit.go Outdated Show resolved Hide resolved
commit.go Outdated Show resolved Hide resolved
commit.go Outdated Show resolved Hide resolved
commit.go Outdated Show resolved Hide resolved
@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 3, 2023

@mtrmac Done.

@flouthoc flouthoc requested a review from mtrmac November 3, 2023 11:19
Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for dealing with this breakage!

@flouthoc flouthoc requested a review from nalind November 3, 2023 15:27
@nalind
Copy link
Member

nalind commented Nov 3, 2023

I don't love moving from a tagged release to a commit, but otherwise it's fine.

@mtrmac
Copy link
Contributor

mtrmac commented Nov 3, 2023

From my POV this is not urgent — it can be included in the next vendor dance. It’s just that with the added deprecation notices, these changes will probably have to be included with that vendor dance.

I’m also open to not immediately adding the depreciation notices, so that there is a tagged version of c/image which contains ResolveImage, and callers can update it without the urgency of a deprecation warning breaking a build. OTOH that deprecation notice / build breakage usually is what motivates the migration… and, as this PR shows, revisiting the call sites to see if they should use ResolveReference is probably worthwhile.

@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 3, 2023

I don't love moving from a tagged release to a commit, but otherwise it's fine.

@nalind I'll vendor c/image as soon as it out, just need c/image to be bumped so i can add integration test for ( containers/image#1645 ) to buildah upstream.

@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 3, 2023

@mtrmac I have checked podman already and bumped c/image there containers/podman#20560 and for buildah this PR will do the trick other than this there is only skopeo which can be affected by c/image change ( not sure if there are any other tools )

@mtrmac
Copy link
Contributor

mtrmac commented Nov 3, 2023

Skopeo does not call the deprecated functions directly.

There’s also c/common, and at a first glance the two calls probably should use ResolveReference to create a storage reference which both fixes an image ID and references a specific digest (instead of creating an ID-only image.storageReference). That would affect the 11 callers of libimage.Image.StorageReference. From a quick check that should all work fine, but it’s possible I have missed a corner case.

@mtrmac
Copy link
Contributor

mtrmac commented Nov 3, 2023

@flouthoc Do you need a new c/image release soonish, then, or should this all happen with the Podman 4.8 vendor dance?

@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 3, 2023

@flouthoc Do you need a new c/image release soonish, then, or should this all happen with the Podman 4.8 vendor dance?

@mtrmac I don't think there is any need for c/image release from my-end so there no rush from my side.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2023
@mtrmac
Copy link
Contributor

mtrmac commented Nov 7, 2023

#5143 will need a c/image updated with these changes, so I’d prefer merging this before the main vendor dance.

mtrmac added a commit to mtrmac/buildah that referenced this pull request Nov 7, 2023
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Contributor

mtrmac commented Nov 8, 2023

I don't love moving from a tagged release to a commit, but otherwise it's fine.

The Podman 4.8 vendoring process was discussed today in context of #5143 , and the plan for that PR is to refer to a commit in dependencies, with the expectation that vendor dance will clean that up soon.

@flouthoc I am seeing “Unit tests w/overlay” consistently falling on a total timeout, with about the same place. This seems to also affect other PRs.

@flouthoc
Copy link
Collaborator Author

flouthoc commented Nov 9, 2023

I think timout was a temp flake.

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
replace deprecated GetStoreImage -> ResolveReference

Signed-off-by: Aditya R <arajan@redhat.com>
@mtrmac
Copy link
Contributor

mtrmac commented Nov 9, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 9, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit bf3b55b into containers:main Nov 9, 2023
35 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants