Skip to content
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

Creating buildbarn storage image doesn't work on bazel 7 #185

Open
ericlchen1 opened this issue Jan 14, 2024 · 2 comments
Open

Creating buildbarn storage image doesn't work on bazel 7 #185

ericlchen1 opened this issue Jan 14, 2024 · 2 comments

Comments

@ericlchen1
Copy link

Running the suggested command to create a buildbarn storage image doesn't work bazel run --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //cmd/bb_storage:bb_storage_container

Bazelisk automatically downloads Bazel 7 which was recently released and doesn't seem to be compatible with bb-storage.
I suggest adding a .bazelversion file with 6.4.0 until compatibility with Bazel 7 is done.

@stagnation
Copy link
Contributor

stagnation commented Jan 15, 2024

Hi, I took a quick look.

The main errors comes form rules_docker and platform transitions/providers.
rules_docker is deprecated and the status of bazel7 and bzlmodule support is unclear.
But there is a workaround flag: --@io_bazel_rules_docker//transitions:enable=false that removes most of the build errors.
bazelbuild/rules_docker#2275

This will build, but I did not verify that the images work properly.

Then it seems that we need to update protobuf and rules_js.
Those updates are simple enough and we can commit that soon:

diff --git a/WORKSPACE b/WORKSPACE
index 8e13aa6..9ee9cb0 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -97,9 +97,8 @@ switched_rules_by_language(

 http_archive(
     name = "com_google_protobuf",
-    sha256 = "a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971",
-    strip_prefix = "protobuf-23.4",
-    urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz"],
+    strip_prefix = "protobuf-25.2",
+    urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protobuf-25.2.tar.gz"],
 )

 load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
@@ -163,9 +162,9 @@ http_archive(

 http_archive(
     name = "aspect_rules_js",
-    sha256 = "00e7b97b696af63812df0ca9e9dbd18579f3edd3ab9a56f227238b8405e4051c",
-    strip_prefix = "rules_js-1.23.0",
-    url = "https://github.com/aspect-build/rules_js/releases/download/v1.23.0/rules_js-v1.23.0.tar.gz",
+    sha256 = "76a04ef2120ee00231d85d1ff012ede23963733339ad8db81f590791a031f643",
+    strip_prefix = "rules_js-1.34.1",
+    url = "https://github.com/aspect-build/rules_js/releases/download/v1.34.1/rules_js-v1.34.1.tar.gz",
 )

@stagnation
Copy link
Contributor

@minor-fixes added the .bazelignore file: #195
I haven't had any time to verify the docker images in the draft PR #186.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants