Always pull the invocation image#1723
Merged
carolynvs merged 2 commits intogetporter:release/v1from Aug 20, 2021
Merged
Conversation
Sometimes the invocation image only exists in the local docker cache but was never pulled. In that case, there isn't a repository digest for the image in the cache and it will fail validation. Always pulling, will ensure that the repo digest is always populated to avoid unexpected errors about missing digests. Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Member
Author
|
This is hard to setup and not worth adding a regression test for. I have verified that porter will now stop and required that the image have been published when you use --reference. |
vdice
approved these changes
Aug 20, 2021
pkg/cnab/provider/driver.go
Outdated
| } | ||
|
|
||
| if driverName == "docker" { | ||
| // Always ensure that the local docker cache has the repository digests for the |
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Closed
carolynvs
added a commit
to carolynvs/porter
that referenced
this pull request
Aug 24, 2021
This reverts commit 19a2675. The change is still something we want eventually but it has exposed problems elsewhere in our codebase that are hard to track down. Namely that when we run the integration tests all at once (not just one at a time manually), the test changes behavior and tries to pull when it normally wouldn't when run separately. This causes problems because some of our bundles do exist with the same reference in dockerhub, but they have a different definition. So pulling causes all sorts of test failures. While I track all of this down, I'm going to revert this change until I can get all the bugs worked out with it. Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
carolynvs
added a commit
that referenced
this pull request
Aug 24, 2021
Revert "Always pull the invocation image (#1723)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change
Sometimes the invocation image only exists in the local docker cache but was never pulled. In that case, there isn't a repository digest for the image in the cache and it will fail validation.
Always pulling, will ensure that the repo digest is always populated to avoid unexpected errors about missing digests.
The docker driver looks for the environment variable PULL_ALWAYS
What issue does it fix
Fixes #1439
Notes for the reviewer
The impact of this is that you cannot use --reference when you haven't pushed the invocation image. Mostly this just closes an accidental loophole where you could be using the definition of a bundle that has been published (and therefore has a digest in the bundle.json for the invocation image) with an invocation image that is only in the local docker cache. That is wonky and we shouldn't allow that regardless.
Checklist