Skip to content

Commit

Permalink
chore: re-enable RBE testing (#531)
Browse files Browse the repository at this point in the history
* chore: re-enable RBE testing

* chore: re-enable RBE testing

* chore: workaround issue I don't understand...
  • Loading branch information
alexeagle authored Jan 27, 2024
1 parent 3e18463 commit ad0539e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ build:rbe --bes_results_url=https://app.buildbuddy.io/invocation/
build:rbe --bes_backend=grpcs://remote.buildbuddy.io
build:rbe --remote_timeout=3600
build:rbe --remote_executor=grpcs://remote.buildbuddy.io

# We are using RBE to test that the actions we create in rules_ts will work for our customers,
# not to accelerate and parallelize the builds for unrelated actions that happen to appear in our dependencies.
# So, turn off RBE for actions that are known to be problematic because they are non-hermetic.
build:rbe --modify_execution_info=CppCompile=+no-remote-exec,CppLink=+no-remote-exec,GenProtoDescriptorSet=+no-remote-exec,ProtocGenEs=+no-remote-exec
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- id: rbe
run: echo "config=rbe" >> $GITHUB_OUTPUT
# Don't run RBE if there is no API token which is the case on forks
if: false # ${{ env.BUILDBUDDY_API_KEY != '' }}
if: ${{ env.BUILDBUDDY_API_KEY != '' }}
outputs:
# Will look like ["local", "rbe"]
configs: ${{ toJSON(steps.*.outputs.config) }}
Expand Down
9 changes: 9 additions & 0 deletions e2e/external_dep/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.4.2")

# TODO: rules_js shouldn't be required in this module, as we don't reference it anywhere.
# However, on RBE only (!) we get an error:
# ERROR: /home/runner/work/rules_ts/rules_ts/e2e/external_dep/app/BUILD:4:11:
# While resolving toolchains for target //:test: com.google.devtools.build.lib.packages.BuildFileNotFoundException:
# no such package '@[unknown repo 'aspect_rules_js' requested from @]//platforms':
# The repository '@[unknown repo 'aspect_rules_js' requested from @]' could not be resolved:
# No repository visible as '@aspect_rules_js' from main repository
bazel_dep(name = "aspect_rules_js", version = "1.37.1")
bazel_dep(name = "aspect_rules_ts", version = "0.0.0")
local_path_override(
module_name = "aspect_rules_ts",
Expand Down
3 changes: 3 additions & 0 deletions e2e/external_dep/app/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.4.1")

# TODO: see note on rules_js in the parent MODULE.bazel
bazel_dep(name = "aspect_rules_js", version = "1.37.1")
bazel_dep(name = "aspect_rules_ts", version = "0.0.0")
local_path_override(
module_name = "aspect_rules_ts",
Expand Down
1 change: 1 addition & 0 deletions ts/private/ts_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def _protoc_action(ctx, proto_info, outputs, options = {
progress_message = "Generating .js/.d.ts from %{label}",
outputs = outputs,
inputs = inputs,
mnemonic = "ProtocGenEs",
arguments = [args],
tools = [ctx.executable.protoc_gen_es] + (
[ctx.executable.protoc_gen_connect_es] if ctx.attr.has_services else []
Expand Down

0 comments on commit ad0539e

Please sign in to comment.