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

Fix restorer target update #1159

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

natalieparellano
Copy link
Member

@natalieparellano natalieparellano commented Jul 25, 2023

When we instantiate the remote image for the purpose of checking target data, we should provide "from base image" so that we don't end up returning data for an empty image

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano changed the base branch from main to release/0.17.0-rc.4 July 25, 2023 19:32
…te run image

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member Author

TDD notes...

Failing test (prior to code changes): https://github.com/buildpacks/lifecycle/actions/runs/5660989254/job/15337920259#step:5:10277

Note that 03cbce912ef1a8a658f73c660ab9c539d67188622f00b15c4f15b89b884f0e10 is a "special" SHA for empty images - e.g.,

	image, _ := remote.NewImage("busybox", authn.DefaultKeychain)
	fmt.Println(image.Identifier())

prints index.docker.io/library/busybox@sha256:03cbce912ef1a8a658f73c660ab9c539d67188622f00b15c4f15b89b884f0e10.

Oddly, I couldn't get this to fail locally. Locally, the run image reference returned is something like 192.168.1.43:64606/some-read-only-run-image-dtakgtkcmh@sha256:d0143fdc9f75c98c264f019d1c690bb17845d4b514ce1a44555eef3794ce3980

I'm assuming this has something to do with oddities around the test registry, but I'm not sure

@natalieparellano natalieparellano marked this pull request as ready for review July 25, 2023 20:15
@natalieparellano natalieparellano requested a review from a team as a code owner July 25, 2023 20:15
Copy link
Contributor

@joe-kimmel-vmw joe-kimmel-vmw left a comment

Choose a reason for hiding this comment

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

LGTM in the sense that unit tests don't lie, but it's a little mysterious.

@joe-kimmel-vmw joe-kimmel-vmw merged commit 40ac1ee into release/0.17.0-rc.4 Jul 27, 2023
@joe-kimmel-vmw joe-kimmel-vmw deleted the fix/restorer-target-update branch July 27, 2023 18:16
@natalieparellano
Copy link
Member Author

LGTM in the sense that unit tests don't lie, but it's a little mysterious.

There was something wrong with my local setup, I can see the failing tests now. All good!

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.

3 participants