Skip to content

Commit aaaa3a4

Browse files
authored
Minor fixes to readme and fix Buck2 CI (#368)
- buck2 issues fix: Pin to specific release + remove attr from go toolchain that was removed upstream - MacOS test-matrix issue: Python requirements lock generation was failing. Updated to latest version of python rules -> had to run `REPIN=1 bazel run @maven//:pin` afterwards to re-generate files with dependencies that need to be modified consistently with python rules update.
1 parent d6f3530 commit aaaa3a4

File tree

10 files changed

+877
-62
lines changed

10 files changed

+877
-62
lines changed

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ bazel_dep(
7676
repo_name = "com_google_googleapis",
7777
)
7878

79-
bazel_dep(name = "rules_python", version = "0.33.2")
79+
bazel_dep(name = "rules_python", version = "1.0.0")
8080

8181
PYTHON_VERSION = "3.12"
8282
python = use_extension("@rules_python//python/extensions:python.bzl", "python")

MODULE.bazel.lock

+71-43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

buck2/cpp/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In the `platforms` cell we specify:
1616
In the `toolchains` cell we specify:
1717

1818
* The c++ toolchain `root//toolchains:cxx_tools_info_toolchain` that is compatible with the remote execution environment.
19-
* The clang tools, `root//toolchains:path_clang_tools, which is used by the c++ toolchain, and specifies the tools installed in the Docker image.
19+
* The clang tools, `root//toolchains:path_clang_tools`, which is used by the c++ toolchain, and specifies the tools installed in the Docker image.
2020
* The remote test execution toolchain, `root//toolchains:remote_test_execution_toolchain`. This toolchain defines platform options in the form of `capabilities`. Critically these include the `container-image`.
2121

2222
The main `BUCK` file defines:
@@ -38,9 +38,9 @@ cas_address = <CLUSTER_NAME>.cluster.engflow.com
3838
http_headers = <AUTH_HTTP_HEADERS>
3939
```
4040

41-
To obtain the value of `<AUTH_HTTP_HEADERS>`, log into https://<CLUSTER_NAME>.cluster.engflow.com/gettingstarted and obtain the value of `x-engflow-auth-token` in section `Method 2: JWT`, take note of this value. Then set `AUTH_HTTP_HEADERS` with the value `x-engflow-auth-method:jwt-v0,x-engflow-auth-token:<JWT_TOKEN_FROM_GETTINGSTARTED_PAGE>.
41+
To obtain the value of `<AUTH_HTTP_HEADERS>`, log into https://<CLUSTER_NAME>.cluster.engflow.com/gettingstarted and obtain the value of `x-engflow-auth-token` in section `Method 2: JWT`, take note of this value. Then set `AUTH_HTTP_HEADERS` with the value `x-engflow-auth-method:jwt-v0,x-engflow-auth-token:<JWT_TOKEN_FROM_GETTINGSTARTED_PAGE>.
4242

43-
Note for CI runs, the auth method used is [Github Tokens](https://docs.engflow.com/re/config/authentication.html#github-tokens).
43+
Note for CI runs, the auth method used is [Github Tokens](https://docs.engflow.com/re/config/authentication.html#github-tokens).
4444

4545
### Usage instructions
4646

buck2/golang/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In the `toolchains` cell we specify:
2222

2323
The `main` cell and `library` cell:
2424

25-
* Contains an copied version of https://github.com/facebook/buck2/tree/main/examples/with_prelude/go that works with Buck2 and RE as configured in this sample project.
25+
* Contains a copied version of https://github.com/facebook/buck2/tree/main/examples/with_prelude/go that works with Buck2 and RE as configured in this sample project.
2626

2727
To test this cell with RE run (after setting up `.buckconfig` as indicated below):
2828

buck2/golang/platforms/defs.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _platforms(ctx):
2424
)
2525

2626
# A bookworm image with go pre-installed.
27-
# Unlike Bazel go_toolchain, Buck2 go_toolchain does not include a hermetic go binary.
27+
# Unlike Bazel go_toolchain, Buck2 go_toolchain does not include a hermetic go binary. Image details can be found in https://gallery.ecr.aws/docker/library/golang.
2828
image = "docker://public.ecr.aws/docker/library/golang:1.23.3-bookworm@sha256:3f3b9daa3de608f3e869cd2ff8baf21555cf0fca9fd34251b8f340f9b7c30ec5"
2929
name = ctx.label.raw_target()
3030
platform = ExecutionPlatformInfo(

buck2/golang/toolchains/BUCK

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ remote_test_execution_toolchain(
5252
"cxx_re_toolchain": {
5353
"use_case": "cxx-testing",
5454
"capabilities": {
55-
"container-image" : "docker://gcr.io/bazel-public/ubuntu2004-java11@sha256:69a78f121230c6d5cbfe2f4af8ce65481aa3f2acaaaf8e899df335f1ac1b35b5",
55+
"container-image" : "docker://public.ecr.aws/docker/library/golang:1.23.3-bookworm@sha256:3f3b9daa3de608f3e869cd2ff8baf21555cf0fca9fd34251b8f340f9b7c30ec5",
5656
},
5757
}
5858
},

buck2/golang/toolchains/defs.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def _remote_go_toolchain_impl(ctx):
7171
go_wrapper = ctx.attrs.go_wrapper[RunInfo],
7272
linker = RunInfo(cmd_script(ctx, "link", cmd_args(go, "tool", "link"), script_os)),
7373
packer = RunInfo(cmd_script(ctx, "pack", cmd_args(go, "tool", "pack"), script_os)),
74-
tags = [],
7574
linker_flags = [],
7675
assembler_flags = [],
7776
compiler_flags = [],

infra/setup-buck2.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
22
set -xe
33

4-
# Get the Buck2 binary.
5-
curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-musl.zst
4+
# Get the Buck2 binary - pinned to https://github.com/facebook/buck2/releases/tag/2024-12-16
5+
curl -L -O https://github.com/facebook/buck2/releases/download/2024-12-16/buck2-x86_64-unknown-linux-musl.zst
66

77
# Unpack the binary.
88
unzstd buck2-x86_64-unknown-linux-musl.zst

0 commit comments

Comments
 (0)