-
Notifications
You must be signed in to change notification settings - Fork 691
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
Expose architecture in container_image #1427
Expose architecture in container_image #1427
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@smukherj1 is this what you had in mind regarding your comment in #1421 (comment) ? |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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.
Thanks! The PR looks good! Could you please add a test? I suggest adding a container_image
target here and then maybe write a sh_test
that depends on the <target>.json
and validates that the architecture string is present in the config.
Sure, I can do that, do you want me to run it as as part of any automated test currently in place like |
Would prefer it runs automatically in the Bazel CI presubmit which it should (if added as an sh_test target) unless explicitly excluded in the |
I might be missing something, was it expected to run automatically indeed? I am looking at the build results in https://buildkite.com/bazel/rules-docker-docker/builds/3872 and I don't see the test listed there. I assume it doesn't actually run automatically and I need to explicitly make it a part of test_targets in |
container_image builds all images labeled as amd64 despite the possibility of it being intended for another architecture, without a way to overwrite this value. Aside from being confusing to a user, this could also be an issue when using said images as part of a manifest list, given the wrong label won't pull the proper image to the system. This patch exposes an architecture attribute that can be used by an user in order to properly label the container image. The default is still amd64 in case it is not set. It also adds a sh_test called architecture_test to verify that when a labeled is set it was actually be properly modified in the config of the target image. Signed-off-by: Murilo Fossa Vicentini <[email protected]>
Apologies. I was assuming we used |
No problem, I added there an it shows up now, thank you. Let me know if you have any additional feedback / concerns regarding the patch. |
/gcbrun |
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.
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: murilofv, smukherj1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Just out of curiosity, now that I noticed, did something happen that the commit message body was not added during the merge? This doesn't look like something expected, but I unfortunately deleted the branch / fork after the merge happened and looks like the references were lost, so haven't been able to look into what could possibly have happened. |
container_image builds all images labeled as amd64 despite the
possibility of it being intended for another architecture, without a way
to overwrite this value. Aside from being confusing to a user, this could
also be an issue when using said images as part of a manifest list, given
the wrong label won't pull the proper image to the system.
This patch exposes an architecture attribute that can be used by an user
in order to properly label the container image. The default is still amd64
in case it is not set.
It also adds a sh_test called architecture_test to verify that when a
labeled is set it was actually be properly modified in the config of the
target image.
Signed-off-by: Murilo Fossa Vicentini [email protected]
Fixes #1421