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

Porter's autobuild check should verify the invocation image is present #1756

Closed
carolynvs opened this issue Sep 14, 2021 · 4 comments
Closed
Labels
bug Oops, sorry! user experience 🌈💖 Make it easier for everyone to use Porter

Comments

@carolynvs
Copy link
Member

Describe the bug

It's possible to get into a situation where porter's check for if the bundle should be rebuilt before publishing passes but the publish fails because the invocation image isn't in the docker cache.

To Reproduce

  1. Build a bundle.
  2. Remove the invocation image from your docker cache. People will do this when they run out of disk space with commands like docker system prune.
  3. Run publish

Expected behavior

Porter detects that the invocation image isn't available, (even though the hash of the bundle has not changed) and rebuilds the bundle before publishing.

Porter Command and Output

I don't have the exact error message when you publish but it's basically a message from docker when we do the push of the invocation image to the registry "blah blah invocation image name: no such image found"

Version

All versions (v0.38.4 and v1 branch)

[e.g. porter v0.14.1-beta.2 (72dd5df)]

@carolynvs carolynvs added bug Oops, sorry! user experience 🌈💖 Make it easier for everyone to use Porter labels Sep 14, 2021
@joshuabezaleel
Copy link
Contributor

@carolynvs Do we want the output for the publish to be an error message that said that the invocation image is not found and thus ask the user to build the bundle again by themselves or when the publish command is run, when it check for the invocation image and can not found it, it also automatically build it again to produce the invocation image and publish it afterwards?

@carolynvs
Copy link
Member Author

There is an existing check in porter to detect if the bundle is out of date and therefore build should be called automatically by porter before continuing to do the publish. That check should be updated to also validate that the invocation image exists. Publish shouldn't return an error, and should automatically call build for you (which is already existing logic in place, we are just updating the if statement for when to build).

@joshuabezaleel
Copy link
Contributor

Permission to document things while I go over trying stuffs since I might take a try on this issue 😀
This is the error message that it outputs while I tried to reproduce the issue using the bundle whalesay installer.

Pushing CNAB invocation image...
The push refers to repository [docker.io/joshuabezaleel/whalesay-installer]
Error: unable to push CNAB invocation image "joshuabezaleel/whalesay-installer:v0.1.2": failed to stream docker push stdout: An image does not exist locally with the tag: joshuabezaleel/whalesay-installer

image

@joshuabezaleel
Copy link
Contributor

I guess the issue can be closed since the corresponding PR has already been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops, sorry! user experience 🌈💖 Make it easier for everyone to use Porter
Projects
None yet
Development

No branches or pull requests

2 participants