-
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.
Fixes for run image extension (#1134)
* When pulling remote image data, fail if the remote image is not found Signed-off-by: Natalie Arellano <narellano@vmware.com> * When validating dockerfiles, set extend to true if there are any instructions (vs more than one instruction) Signed-off-by: Natalie Arellano <narellano@vmware.com> * Update matching logic when considering if two image names are equivalent to ignore the digest portion of the reference if present (for the purpose of selecting data from run.toml to add to the lifecycle metadata label i.e., “run image for rebase”) Signed-off-by: Natalie Arellano <narellano@vmware.com> * Comments and cleanup Don't print `%!s(<nil>)` if nil is provided to the "parse maybe" function Signed-off-by: Natalie Arellano <narellano@vmware.com> * When exporting, continue to use run image identifier (which could be a digest reference or daemon image ID) instead of falling back to image name when exporting to a daemon. Previously, the digest reference was incorrect which caused the daemon not to find the image. But when provided a correct digest reference the daemon can still find it. Signed-off-by: Natalie Arellano <narellano@vmware.com> * Add Contains method to structs that hold run image information for export When determining if a provided reference is found in existing metadata, remove its digest - except when setting the new run image "image" in analyzed.toml, because we should always respect what the extension author wrote. Signed-off-by: Natalie Arellano <narellano@vmware.com> * When finding the run image info for export, use the run image "image" (name) in analyzed.toml as the search key, because the run image "reference" could be a daemon image ID or include the digest, which isn't helpful when retrieving image names that are supposed to float. Signed-off-by: Natalie Arellano <narellano@vmware.com> * Fix detector acceptance and add more logging Signed-off-by: Natalie Arellano <narellano@vmware.com> * Fix: use "image" instead of "reference" and also guard against image not found when we are only updating the reference and target data in analyzed.toml Signed-off-by: Natalie Arellano <narellano@vmware.com> * Add comment Signed-off-by: Natalie Arellano <narellano@vmware.com> --------- Signed-off-by: Natalie Arellano <narellano@vmware.com>
- Loading branch information
1 parent
f7708d9
commit 84a94d5
Showing
30 changed files
with
349 additions
and
315 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
2 changes: 1 addition & 1 deletion
2
acceptance/testdata/restorer/container/layers/some-extend-false-analyzed.toml.placeholder
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[run-image] | ||
reference = "REPLACE" | ||
reference = "" | ||
image = "REPLACE" |
2 changes: 1 addition & 1 deletion
2
acceptance/testdata/restorer/container/layers/some-extend-true-analyzed.toml.placeholder
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[run-image] | ||
reference = "REPLACE" | ||
reference = "" | ||
extend = true | ||
image = "REPLACE" |
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
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
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
Oops, something went wrong.