-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rebase run-image resolution (#1305)
* Fix rebase run-image resolution Currently, if `-run-image` is not set, `io.buildpacks.lifecycle.metdata[runImage.reference]` is used. This does not follow the [Run Image Resolution spec](https://github.com/buildpacks/spec/blob/main/platform.md#run-image-resolution), which specifies using `io.buildpacks.lifecycle.metdata[runImage.image]` and optionally `io.buildpacks.lifecycle.metdata[runImage.mirrors]`. Because of this, it ends up making `lifecycle rebase` without the `-run-image` flag a no-op because the run image is pinned to the same version instead of getting the latest. This change simplfies and unifies the behavior for before and after Platform Version 0.12 so that they both read the same run-image data type (just from different locations), and then validate and resolve mirrors the same. Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com> * Rewrite if-else-if-else as switch for go-critic This is to make go-critic happy. See go-critic/go-critic#453. Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com> * Extract and test platform.GetRunImageFromMetadata Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com> --------- Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com>
- Loading branch information
1 parent
f885774
commit 73af3c1
Showing
3 changed files
with
72 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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