Skip to content

[build] Assign larger RBE runner for linking workerd - #8349

Merged
fhanau merged 1 commit into
mainfrom
felix/111026-link-runner
Nov 11, 2026
Merged

fhanau merged 1 commit into
mainfrom
felix/111026-link-runner

Conversation

@fhanau

@fhanau fhanau commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Also applies to gen-compile-cache, which also appears in the critical path.

This makes bazelflare opt builds faster as linker optimizations are less of a bottleneck when run in parallel.

See internal PR for more context.

@fhanau
fhanau requested review from a team as code owners November 10, 2026 21:41

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 5ad4428c.

This review, of b24acf46

💬 Approved with comments — Clean build-config change with no correctness concerns; one optional docstring wording fix.

Findings: 1 suggestion (1 is an inline comment on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 suggestion

One docstring nit; the exec_properties wiring looks correct.

Recommendation: 💬 Optional Nits

  • [SUGGESTION] Stray # in the opt_link_exec_properties docstring (build/bazelflare/exec_properties.bzl:36)
View full review
  • build/bazelflare/exec_properties.bzl:35-36: There is a stray # in the opt_link_exec_properties docstring, so the line reads "The cpp_link. # prefix". The phrase "an executor to itself" is also hard to parse.

The rest checks out. The config_settings combine compilation_mode=opt with the new opt_link_executor flag. wd_rust_binary passes exec_properties only to the binary. experimental_use_cc_common_link = 1 means the link goes through the cpp_link exec group.


✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: b24acf46

Comment thread build/bazelflare/exec_properties.bzl Resolved
@fhanau
fhanau force-pushed the felix/111026-link-runner branch from b24acf4 to 5ad4428 Compare November 10, 2026 22:02

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 07dda0cc.

This review, of 5ad4428c

✅ Approved — The build-config change is correct, and the one docstring nit from the last review is fixed.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The stray # in the opt_link_exec_properties docstring is gone in build/bazelflare/exec_properties.bzl:31-37.

The rest of the change checks out:

  • The new select keys cpp_link.slots and cpp_link.runner apply only to the cpp_link exec group.
  • Both config_settings combine the executor flag with compilation_mode=opt.
  • wd_rust_binary passes exec_properties only to the binary target.

📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: 5ad4428c

@fhanau
fhanau force-pushed the felix/111026-link-runner branch from 5ad4428 to 07dda0c Compare November 11, 2026 02:01

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of b9c53e35.

This review, of 07dda0cc

✅ Approved — The build configuration correctly scopes the larger link runner to opt builds and the cpp_link exec group, and nothing new came up since the last review.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The change matches the commit reviewed last time.

  • Each of the two config_settings keys on the link executor flag together with compilation_mode=opt.
  • link_exec_properties() sets only keys prefixed with cpp_link., so the larger runner applies only to the link exec group.
  • wd_rust_binary passes exec_properties to the binary target only, not to its test.
  • In .bazelrc, --//src/workerd/server:use_tcmalloc=False now uses a main-repo label instead of @workerd//. The neighbouring //build/bazelflare:... flags already use that form, so this is consistent.

📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: 07dda0cc

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@fhanau
fhanau force-pushed the felix/111026-link-runner branch from 07dda0c to b9c53e3 Compare November 11, 2026 02:57

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 4b9bb1d3.

This review, of b9c53e35

💬 Approved with comments — No correctness problems. One INFO: the larger-runner selection no longer depends on opt builds, which doesn't match the pull request title.

Findings: 1 info (1 is an inline comment on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 info

The larger link runner now applies in every compilation mode, not only opt builds.

Recommendation: 💬 Optional Nits

  • [INFO] The larger link runner is selected in all compilation modes, not only opt builds as the pull request title says (build/config/BUILD.bazel:54)
View full review

At this commit, the three config_settings in build/config/BUILD.bazel (lines 52-65) match only on :link_executor. .bazelrc:644 sets --//build/config:link_executor=bazelflare for every bazelflare build. Fastbuild, dbg and sanitizer builds therefore also reserve slots=1 for workerd and gen-compile-cache. On bazelflare the property has no cpp_link. prefix, so it also applies to the targets' other actions, not just the link. If this is intended, the pull request title ("in opt builds") is out of date. If not, add values = {"compilation_mode": "opt"} to the settings.


✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: b9c53e35

Comment thread build/config/BUILD.bazel Resolved
Also applies to gen-compile-cache, which also appears in the critical path.
@fhanau
fhanau force-pushed the felix/111026-link-runner branch from b9c53e3 to 4b9bb1d Compare November 11, 2026 15:21

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Significant concerns — 1 BLOCKING: the three new config_settings in build/config/BUILD.bazel are private, so the selects in //src/workerd/server:workerd and //src/rust/gen-compile-cache should fail analysis under Bazel 9.3.1. There is also one INFO, carried over: the larger runner applies in every compilation mode, not only in opt builds.

Findings: 1 blocking · 1 info (1 is an inline comment on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.

🔧 Fix with your agent

Paste the following into your coding agent to investigate and fix these issues.

Fix the following code review issues found in pull request #8349.

Before making changes, review each issue and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g., the fix would require disproportionate changes
  for minimal ROI, or the finding is factually incorrect), explain why
- If you need to clarify something before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

## BLOCKING (1)

### [Code Quality] Present since b9c53e35, missed in the earlier review: the new config_settings have no visibility, so they are private to //build/config and the selects in //src/workerd/server and //src/rust/gen-compile-cache should fail analysis.
- **File:** build/config/BUILD.bazel:52

## INFO (1)

### [Code Quality] The larger link runner is selected in all compilation modes, not only in opt builds as the pull request title says.
- **File:** build/config/BUILD.bazel:54

📋 Code Quality: 🛑 1 blocking · 1 info

The new link_executor config_settings are private, so workerd and gen-compile-cache will probably fail analysis. The earlier note that the runner applies in all compilation modes still holds.

Recommendation: 🔴 Serious Concerns

  • [BLOCKING] Present since b9c53e3, missed in the earlier review: the new config_settings have no visibility, so they are private to //build/config and the selects in //src/workerd/server and //src/rust/gen-compile-cache should fail analysis. (build/config/BUILD.bazel:52)
  • [INFO] The larger link runner is selected in all compilation modes, not only in opt builds as the pull request title says. (build/config/BUILD.bazel:54)
View full review

The new config_settings are not visible to the packages that select on them (BLOCKING)

build/config/BUILD.bazel:52-65 defines link_on_bazelflare, link_on_bazelflare_internal and link_on_rbe_ci without a visibility attribute, and the package has no default_visibility.

The repository pins Bazel 9.3.1 (.bazelversion). From Bazel 7 on, a config_setting is private by default and Bazel enforces its visibility. .bazelrc doesn't override either behaviour.

link_exec_properties() is a legacy macro, so its select belongs to the calling targets. Those are //src/workerd/server:workerd and //src/rust/gen-compile-cache:gen-compile-cache, and both are outside //build/config.

Bazel checks every key of a select whichever branch matches, so analysis of both binaries should fail in every configuration. The other targets in this file, and //build/bazelflare:on_bazelflare (package default_visibility), are all public.

Fix: add visibility = ["//visibility:public"] to the three settings.

The larger runner applies in all compilation modes (INFO, carried over; code unchanged)

The settings match only on :link_executor, and .bazelrc sets that flag for every bazelflare build. Fastbuild, dbg and sanitizer builds therefore reserve slots=1 for these binaries too.

On bazelflare the property has no cpp_link. prefix, so it applies to all of the target's actions, not only the link.


✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: 4b9bb1d3

Comment thread build/config/BUILD.bazel Resolved
@fhanau fhanau changed the title [build] Assign larger RBE runner for linking workerd in opt builds [build] Assign larger RBE runner for linking workerd Nov 11, 2026
@fhanau
fhanau merged commit 50080ca into main Nov 11, 2026
23 of 24 checks passed
@fhanau
fhanau deleted the felix/111026-link-runner branch November 11, 2026 16:01
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 this pull request may close these issues.

2 participants