-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat: publish multi-arch images #199
Conversation
I just learned about #167 , sorry this is replacing that I think |
Do you think my change is responsible for the gazelle failure on CI? |
Yes. I can reproduce it by running the commands run by the CI pipeline on my local system. It looks like I can address it by calling diff --git a/WORKSPACE b/WORKSPACE
index 8806a54..9747956 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -73,6 +73,8 @@ go_rules_dependencies()
go_register_toolchains(version = "1.21.5")
+gazelle_dependencies()
+
load("@rules_oci//oci:pull.bzl", "oci_pull")
load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains")
@@ -101,8 +103,6 @@ oci_pull(
],
)
-gazelle_dependencies()
-
http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "09a94213ea0d4a844e991374511fb0d44650e9c321799ec5d5dd28b250d82ca3", |
PTAL - I have not integration-tested this by pushing a container and running a service from it. |
I created bazel-contrib/rules_oci#531 to make |
We should at some point upgrade to Bazel 7.x, but that requires more bzlmod trickery. Let's first jump to 6.4.0, so that Alex can use native.package_relative_label() in PR #199.
We should at some point upgrade to Bazel 7.x, but that requires more bzlmod trickery. Let's first jump to 6.4.0, so that Alex can use native.package_relative_label() in PR #199.
We should at some point upgrade to Bazel 7.x, but that requires more bzlmod trickery. Let's first jump to 6.4.0, so that Alex can use native.package_relative_label() in PR #199.
I saw that that PR build of yours failed with some protoc code generation issues. I thought that would be caused by the Bazel 6.1.0 upgrade, so that's why I just did an upgrade to Bazel 6.4.0. Be sure to rebase your PR on top of |
Allows bb-storage users to deploy on arm64 architecture, e.g. AWS Graviton. Fixes buildbarn#198
Note this requires upgrading Bazel by one minor release to get native.package_relative_label
arch_image_target = "{}_{}_image".format(name, arch) | ||
target_platform = "@io_bazel_rules_go//go/toolchain:linux_{}".format(arch) | ||
images.append(arch_image_target) | ||
platform_transition_filegroup( |
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.
Note, if we accept bazel-contrib/rules_oci#531 I'll cut a release there and come back in a follow-up PR to simplify this code to use it.
@moroten FYI that I tried patching your rules_oci PR but it still fails on https://github.com/buildbarn/bb-storage/actions/runs/8397776269/job/23006173303?pr=201 |
@EdSchouten I'm hoping my last commit made it green - do you have something like a label you could apply so the workflow doesn't require a manual approval when I push commits? 🙏🏻 |
Github auto approves workflows if you have made at least 1 commit to this repo. So after I merge this change, any followup PR made by you should automatically run the build. |
Hooray it's green, anything else you'd like me to change? |
Thank you for merging this. The ideas with bazel-contrib/rules_oci#531 for multi arch images will take some time to get ready. |
Lets us re-use the multi-arch image setup from buildbarn/bb-storage#199
Allows bb-storage users to deploy on arm64 architecture, e.g. AWS Graviton. Fixes #198