fix(bazel): don't give absolute path for images#347
Merged
Conversation
This causes us to hit GoogleContainerTools#183 in most cases. See https://buildkite.com/bazel/bcr-presubmit/builds/1247#0187e4cc-44e1-4e21-89a7-08e71f612bfc as an example. We'll need to fix this in order to properly support Windows, but that is already broken for other reasons.
thesayyn
reviewed
May 4, 2023
| if [[ -d "$image" ]]; then | ||
| readonly DIGEST=$("$yq" eval '.manifests[0].digest | sub(":"; "-")' "${{image}}/index.json") | ||
| if [[ -d "{image_path}" ]]; then | ||
| readonly DIGEST=$("$yq" eval '.manifests[0].digest | sub(":"; "-")' "{image_path}/index.json") |
Collaborator
There was a problem hiding this comment.
according to https://github.com/bazel-contrib/rules_oci/blob/770bedd27413eb093dd4123f1118876b61cb63da/oci/private/structure_test.bzl#L35 --default-image-tag needs to be added to args
Collaborator
Author
There was a problem hiding this comment.
Yeah oops! Thanks
Collaborator
There was a problem hiding this comment.
unrelated question; the newest version of yq requires -oj to suppress the default output warning and -r to restore the output raw which was the default in the previous version. can we also add those to yq call here to allow future versions of yq to be used?
Collaborator
Author
There was a problem hiding this comment.
let's add in a separate PR. We need some test coverage for this branch as well.
thesayyn
approved these changes
May 4, 2023
loosebazooka
approved these changes
May 4, 2023
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.
This causes us to hit #183 in most cases. See https://buildkite.com/bazel/bcr-presubmit/builds/1247#0187e4cc-44e1-4e21-89a7-08e71f612bfc as an example.
We'll need to fix this in order to properly support Windows, but that is already broken for other reasons.