-
Notifications
You must be signed in to change notification settings - Fork 200
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
fix(bazel): don't give absolute path for images #347
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.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah oops! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add in a separate PR. We need some test coverage for this branch as well.
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.