Consolidated most bazel configs in new build folder #2303

Closed
marvin-hansen wants to merge 0 commits from refs/pull/2303/head into main
marvin-hansen commented 2025-10-10 07:18:11 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #1740
Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/pull/1740
Original created: 2025-10-10T07:18:11Z
Original updated: 2025-10-11T08:42:44Z
Original head: main
Original base: main

User description

Moved the bulk of adjacent Bazel configs into the new build folder.

the tools folder is gone now.

Instead, build contains

  • bazel - the bazelisk wrapper
  • buildbuddy - the release_pipeline script and target
  • platforms
  • rbe - the rbe_platform targets for buildbuddy.
  • toolchains - rbe_cc_toolchain
  • test - consider renaming this to alias and move to root

Bazel builds, when they grow large, have a bit of an issue with paths due to Bazel being path dependent.

its always good practive to have an alias folder in the root and in it, a bunch of alises
i.e.
alias
BUILD.bazel
tools/BUILD.bazel

In any target, you can now call

deps = [
    "//alias/my_lib",

]

However, in case my_lib ever moves to a different folder, just update the alias the build runs as before.
Without the alias, you would have to search and replace the new path manually.

As for tools, its about the same, as you can call

deps = [
    "//alias/tools:test_wrapper",

]

regardless of where that tool resides.


PR Type

Enhancement


Description

  • Consolidated Bazel configuration files into build/ folder

  • Updated path references from tools/ to build/

  • Added comprehensive build documentation and dependencies

  • Reorganized MODULE.bazel with better structure and comments


Diagram Walkthrough

flowchart LR
  A["tools/ folder"] -- "moved to" --> B["build/ folder"]
  B --> C["build/bazel/"]
  B --> D["build/buildbuddy/"]
  B --> E["build/rbe/"]
  B --> F["build/toolchains/"]
  G["Path references"] -- "updated" --> H["New build/ paths"]

File Walkthrough

Relevant files
Formatting
1 files
tests.rs
Remove unused mut keyword from closure                                     
+1/-1     
Bug fix
1 files
build.rs
Update tonic_build method call                                                     
+1/-1     
Configuration changes
5 files
release_pipeline.sh
Update bazel binary path reference                                             
+1/-1     
.bazelrc
Update RBE platform paths                                                               
+2/-2     
workflows.yaml
Update buildbuddy target path                                                       
+1/-1     
MODULE.bazel
Reorganize dependencies with better structure                       
+37/-30 
BUILD
Update platform parent references                                               
+2/-2     
Documentation
1 files
BUILD.md
Add comprehensive build documentation                                       
+51/-0   
Additional files
6 files
README.md [link]   
bazel [link]   
BUILD.bazel [link]   
BUILD.bazel [link]   
BUILD.bazel [link]   
BUILD.bazel [link]   

Imported from GitHub pull request. Original GitHub pull request: #1740 Original author: @marvin-hansen Original URL: https://github.com/carverauto/serviceradar/pull/1740 Original created: 2025-10-10T07:18:11Z Original updated: 2025-10-11T08:42:44Z Original head: main Original base: main --- ### **User description** Moved the bulk of adjacent Bazel configs into the new build folder. the tools folder is gone now. Instead, build contains * bazel - the bazelisk wrapper * buildbuddy - the release_pipeline script and target * platforms * rbe - the rbe_platform targets for buildbuddy. * toolchains - rbe_cc_toolchain * test - consider renaming this to alias and move to root Bazel builds, when they grow large, have a bit of an issue with paths due to Bazel being path dependent. its always good practive to have an alias folder in the root and in it, a bunch of alises i.e. alias BUILD.bazel tools/BUILD.bazel In any target, you can now call deps = [ "//alias/my_lib", ] However, in case my_lib ever moves to a different folder, just update the alias the build runs as before. Without the alias, you would have to search and replace the new path manually. As for tools, its about the same, as you can call deps = [ "//alias/tools:test_wrapper", ] regardless of where that tool resides. ___ ### **PR Type** Enhancement ___ ### **Description** - Consolidated Bazel configuration files into `build/` folder - Updated path references from `tools/` to `build/` - Added comprehensive build documentation and dependencies - Reorganized MODULE.bazel with better structure and comments ___ ### Diagram Walkthrough ```mermaid flowchart LR A["tools/ folder"] -- "moved to" --> B["build/ folder"] B --> C["build/bazel/"] B --> D["build/buildbuddy/"] B --> E["build/rbe/"] B --> F["build/toolchains/"] G["Path references"] -- "updated" --> H["New build/ paths"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Formatting</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>tests.rs</strong><dd><code>Remove unused mut keyword from closure</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-85c5601521c9a9784723e5882651a72b3828419842d17046e71c65330bb95419">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Bug fix</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>build.rs</strong><dd><code>Update tonic_build method call</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-660177a66a475c1af352388464e4dcf4fab913c3411b6f1315322dba0013c220">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>5 files</summary><table> <tr> <td><strong>release_pipeline.sh</strong><dd><code>Update bazel binary path reference</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-08d9d15c1ded8af19dd4d4dcbb2d32ce9eb70118e69a60936a3f2d2f57b93ecf">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>.bazelrc</strong><dd><code>Update RBE platform paths</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832f">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>workflows.yaml</strong><dd><code>Update buildbuddy target path</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-ab6de3b3c2e87a5324595cc6b8656ab7bae1dee7d0c60e0626128e634f71711d">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>MODULE.bazel</strong><dd><code>Reorganize dependencies with better structure</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdc">+37/-30</a>&nbsp; </td> </tr> <tr> <td><strong>BUILD</strong><dd><code>Update platform parent references</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-ac0d5204dc44afc495e4f6899ae668175ade69fa6b3324c94261ae2461586a21">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>BUILD.md</strong><dd><code>Add comprehensive build documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-40f60e1037245d7b8a98a7325d53890a717da9979adeb54a61a795c4ba07f9c9">+51/-0</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Additional files</strong></td><td><details><summary>6 files</summary><table> <tr> <td><strong>README.md</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-7db9ba13f8695c024ba5bf51ac9d01d9e9e9d4a5ef80c2d11f6da4a0c2222a8a">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-4c906cadb18c7331a7e7e698a1930f4fd2fe75fbfc4f6cb464f68c152e0f653a">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>BUILD.bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-efb80240a0f02bccb5762c8519c1e693d607ad38bdca17cd3d168e685fc96eb7">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>BUILD.bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-d7da264d8f13c39aafc9e2343c3f9649ee1b143f653edda46521f21378a8467e">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>BUILD.bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-3d25ca04fba14120fa086b85e4785d6b7cc3d3bae190173ac9f80d4bf1e177e4">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>BUILD.bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-214d6cbad7dbfa70bcb6bda0479bdd95531e028671f976ff894bb68c3f3be5b4">[link]</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2025-10-10 07:18:48 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388606902
Original created: 2025-10-10T07:18:48Z

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
- Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388606902 Original created: 2025-10-10T07:18:48Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/7e49f480434df4f378f1fa7ea0112385521989cf --> Below is a summary of compliance checks for this PR:<br> <table><tbody><tr><td colspan='2'><strong>Security Compliance</strong></td></tr> <tr><td>🟢</td><td><details><summary><strong>No security concerns identified</strong></summary> No security vulnerabilities detected by AI analysis. Human verification advised for critical code. </details></td></tr> <tr><td colspan='2'><strong>Ticket Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary>🎫 <strong>No ticket provided </summary></strong> - [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true --> </details></td></tr> <tr><td colspan='2'><strong>Codebase Duplication Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary><strong>Codebase context is not defined </strong></summary> Follow the <a href='https://qodo-merge-docs.qodo.ai/core-abilities/rag_context_enrichment/'>guide</a> to enable codebase context checks. </details></td></tr> <tr><td colspan='2'><strong>Custom Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary><strong>No custom compliance provided</strong></summary> Follow the <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/'>guide</a> to enable custom compliance check. </details></td></tr> <tr><td align="center" colspan="2"> <!-- placeholder --> <!-- /compliance --update_compliance=true --> </td></tr></tbody></table> <details><summary>Compliance status legend</summary> 🟢 - Fully Compliant<br> 🟡 - Partial Compliant<br> 🔴 - Not Compliant<br> ⚪ - Requires Further Human Verification<br> 🏷️ - Compliance label<br> </details>
qodo-code-review[bot] commented 2025-10-10 07:19:44 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388609358
Original created: 2025-10-10T07:19:44Z

PR Code Suggestions

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Implement the proposed alias pattern

Instead of replacing old hardcoded paths with new ones, implement the alias
pattern mentioned in the PR description. This involves creating an alias
directory to decouple targets from their physical file paths, improving the
build system's resilience to future changes.

Examples:

.bazelrc [54-55]
build:remote --host_platform=//build/rbe:rbe_platform
build:remote --platforms=//build/rbe:rbe_platform
.buildbuddy/workflows.yaml [22]
      - "run --config=remote //build/buildbuddy:release_pipeline"

Solution Walkthrough:

Before:

# .bazelrc
build:remote --platforms=//build/rbe:rbe_platform

# .buildbuddy/workflows.yaml
bazel_commands:
  - "run --config=remote //build/buildbuddy:release_pipeline"

# MODULE.bazel
register_execution_platforms(
    "//build/rbe:rbe_platform",
    ...
)

# build/rbe/BUILD
platform(
    name = "ocaml_rbe_ocamlopt",
    parents = [":rbe_platform"], # local reference
    ...
)

After:

# alias/BUILD.bazel (new file)
alias(
    name = "rbe_platform",
    actual = "//build/rbe:rbe_platform",
)
alias(
    name = "release_pipeline",
    actual = "//build/buildbuddy:release_pipeline",
)

# .bazelrc
build:remote --platforms=//alias:rbe_platform

# .buildbuddy/workflows.yaml
bazel_commands:
  - "run --config=remote //alias:release_pipeline"

# MODULE.bazel
register_execution_platforms(
    "//alias:rbe_platform",
    ...
)

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the PR fails to implement the alias pattern mentioned in its own description, missing a key opportunity to improve the build system's long-term maintainability during a large refactoring.

High
Possible issue
Fix broken Bazelisk download link

Update the Bazelisk download URL in BUILD.md from the non-existent version
v1.27.0 to a valid version like v1.19.0.

BUILD.md [11]

-wget https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64
+wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a broken download link in the build instructions, which would prevent developers from setting up the project.

Medium
Possible issue
Make protoc pathing robust

To prevent build failures in hermetic environments, ensure protoc is findable by
tonic_build by configuring the build to set the PROTOC and PROTOC_INCLUDE
environment variables.

cmd/poller-ng/build.rs [26-30]

+// Optionally honor environment overrides to ensure protoc is available in hermetic/remote builds.
+if let Ok(protoc) = env::var("PROTOC") {
+    std::env::set_var("PROTOC", protoc);
+}
+if let Ok(protoc_include) = env::var("PROTOC_INCLUDE") {
+    std::env::set_var("PROTOC_INCLUDE", protoc_include);
+}
+
 tonic_build::configure()
     .build_server(true)
     .build_client(true)
     .file_descriptor_set_path(monitoring_descriptor_path)
     .compile_protos(&["src/proto/monitoring.proto"], &["src/proto"])?;

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential build failure in hermetic environments like Bazel RBE, which is the focus of this PR, and proposes a standard solution to improve build robustness.

Medium
General
Prevent hard-fail on missing platform

Verify that the new Bazel platform target //build/rbe:rbe_platform is correctly
defined to prevent remote build failures. Consider adding a comment or a
fallback mechanism.

.bazelrc [54-55]

+# Remote execution profile (opt-in via --config=remote).
+build:remote --remote_executor=grpcs://remote.buildbuddy.io
+build:remote --remote_cache=grpcs://remote.buildbuddy.io
 build:remote --host_platform=//build/rbe:rbe_platform
 build:remote --platforms=//build/rbe:rbe_platform
+# Fallback to host platform if the RBE platform is unavailable (prevents hard failures during migration).
+# build:remote --platforms=@platforms//host:host
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly asks the user to verify that the newly referenced Bazel target //build/rbe:rbe_platform exists, which is a valid and important check during a build system refactor.

Low
  • More
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388609358 Original created: 2025-10-10T07:19:44Z --- ## PR Code Suggestions ✨ <!-- 7e49f48 --> Explore these optional code suggestions: <table><thead><tr><td><strong>Category</strong></td><td align=left><strong>Suggestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </strong></td><td align=center><strong>Impact</strong></td></tr><tbody><tr><td rowspan=1>High-level</td> <td> <details><summary>Implement the proposed alias pattern</summary> ___ **Instead of replacing old hardcoded paths with new ones, implement the alias <br>pattern mentioned in the PR description. This involves creating an alias <br>directory to decouple targets from their physical file paths, improving the <br>build system's resilience to future changes.** ### Examples: <details> <summary> <a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832fR54-R55">.bazelrc [54-55]</a> </summary> ```starlark build:remote --host_platform=//build/rbe:rbe_platform build:remote --platforms=//build/rbe:rbe_platform ``` </details> <details> <summary> <a href="https://github.com/carverauto/serviceradar/pull/1740/files#diff-ab6de3b3c2e87a5324595cc6b8656ab7bae1dee7d0c60e0626128e634f71711dR22-R22">.buildbuddy/workflows.yaml [22]</a> </summary> ```yaml - "run --config=remote //build/buildbuddy:release_pipeline" ``` </details> ### Solution Walkthrough: #### Before: ```yaml # .bazelrc build:remote --platforms=//build/rbe:rbe_platform # .buildbuddy/workflows.yaml bazel_commands: - "run --config=remote //build/buildbuddy:release_pipeline" # MODULE.bazel register_execution_platforms( "//build/rbe:rbe_platform", ... ) # build/rbe/BUILD platform( name = "ocaml_rbe_ocamlopt", parents = [":rbe_platform"], # local reference ... ) ``` #### After: ```yaml # alias/BUILD.bazel (new file) alias( name = "rbe_platform", actual = "//build/rbe:rbe_platform", ) alias( name = "release_pipeline", actual = "//build/buildbuddy:release_pipeline", ) # .bazelrc build:remote --platforms=//alias:rbe_platform # .buildbuddy/workflows.yaml bazel_commands: - "run --config=remote //alias:release_pipeline" # MODULE.bazel register_execution_platforms( "//alias:rbe_platform", ... ) ``` <details><summary>Suggestion importance[1-10]: 9</summary> __ Why: The suggestion correctly identifies that the PR fails to implement the alias pattern mentioned in its own description, missing a key opportunity to improve the build system's long-term maintainability during a large refactoring. </details></details></td><td align=center>High </td></tr><tr><td rowspan=1>Possible issue</td> <td> <details><summary>Fix broken Bazelisk download link</summary> ___ **Update the Bazelisk download URL in <code>BUILD.md</code> from the non-existent version <br><code>v1.27.0</code> to a valid version like <code>v1.19.0</code>.** [BUILD.md [11]](https://github.com/carverauto/serviceradar/pull/1740/files#diff-40f60e1037245d7b8a98a7325d53890a717da9979adeb54a61a795c4ba07f9c9R11-R11) ```diff -wget https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64 +wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 ``` - [ ] **Apply / Chat** <!-- /improve --apply_suggestion=1 --> <details><summary>Suggestion importance[1-10]: 8</summary> __ Why: The suggestion correctly identifies a broken download link in the build instructions, which would prevent developers from setting up the project. </details></details></td><td align=center>Medium </td></tr><tr><td rowspan=1>Possible issue</td> <td> <details><summary>Make protoc pathing robust</summary> ___ **To prevent build failures in hermetic environments, ensure <code>protoc</code> is findable by <br><code>tonic_build</code> by configuring the build to set the <code>PROTOC</code> and <code>PROTOC_INCLUDE</code> <br>environment variables.** [cmd/poller-ng/build.rs [26-30]](https://github.com/carverauto/serviceradar/pull/1740/files#diff-660177a66a475c1af352388464e4dcf4fab913c3411b6f1315322dba0013c220R26-R30) ```diff +// Optionally honor environment overrides to ensure protoc is available in hermetic/remote builds. +if let Ok(protoc) = env::var("PROTOC") { + std::env::set_var("PROTOC", protoc); +} +if let Ok(protoc_include) = env::var("PROTOC_INCLUDE") { + std::env::set_var("PROTOC_INCLUDE", protoc_include); +} + tonic_build::configure() .build_server(true) .build_client(true) .file_descriptor_set_path(monitoring_descriptor_path) .compile_protos(&["src/proto/monitoring.proto"], &["src/proto"])?; ``` `[To ensure code accuracy, apply this suggestion manually]` <details><summary>Suggestion importance[1-10]: 7</summary> __ Why: The suggestion correctly identifies a potential build failure in hermetic environments like Bazel RBE, which is the focus of this PR, and proposes a standard solution to improve build robustness. </details></details></td><td align=center>Medium </td></tr><tr><td rowspan=1>General</td> <td> <details><summary>Prevent hard-fail on missing platform</summary> ___ **Verify that the new Bazel platform target <code>//build/rbe:rbe_platform</code> is correctly <br>defined to prevent remote build failures. Consider adding a comment or a <br>fallback mechanism.** [.bazelrc [54-55]](https://github.com/carverauto/serviceradar/pull/1740/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832fR54-R55) ```diff +# Remote execution profile (opt-in via --config=remote). +build:remote --remote_executor=grpcs://remote.buildbuddy.io +build:remote --remote_cache=grpcs://remote.buildbuddy.io build:remote --host_platform=//build/rbe:rbe_platform build:remote --platforms=//build/rbe:rbe_platform +# Fallback to host platform if the RBE platform is unavailable (prevents hard failures during migration). +# build:remote --platforms=@platforms//host:host ``` - [ ] **Apply / Chat** <!-- /improve --apply_suggestion=3 --> <details><summary>Suggestion importance[1-10]: 6</summary> __ Why: The suggestion correctly asks the user to verify that the newly referenced Bazel target `//build/rbe:rbe_platform` exists, which is a valid and important check during a build system refactor. </details></details></td><td align=center>Low </td></tr> <tr><td align="center" colspan="2"> - [ ] More <!-- /improve --more_suggestions=true --> </td><td></td></tr></tbody></table>
marvin-hansen commented 2025-10-10 07:33:49 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388653429
Original created: 2025-10-10T07:33:49Z

 CI fails with:

(02:31:20) ERROR: The Build Event Protocol upload failed: Not retrying publishBuildEvents, no more attempts left: status='Status{code=PERMISSION_DENIED, description=Anonymous access disabled, permission denied., cause=null}' PERMISSION_DENIED: PERMISSION_DENIED: Anonymous access disabled, permission denied. PERMISSION_DENIED: PERMISSION_DENIED: Anonymous access disabled, permission denied.
(02:31:20) INFO:

Imported GitHub PR comment. Original author: @marvin-hansen Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3388653429 Original created: 2025-10-10T07:33:49Z --- CI fails with: (02:31:20) ERROR: The Build Event Protocol upload failed: Not retrying publishBuildEvents, no more attempts left: status='Status{code=PERMISSION_DENIED, description=Anonymous access disabled, permission denied., cause=null}' PERMISSION_DENIED: PERMISSION_DENIED: Anonymous access disabled, permission denied. PERMISSION_DENIED: PERMISSION_DENIED: Anonymous access disabled, permission denied. (02:31:20) INFO:
marvin-hansen commented 2025-10-10 20:06:16 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3392167102
Original created: 2025-10-10T20:06:16Z

Just a quick note on the aliases, if there are no objections i add this over the weekend and add a note somewhere how to use them. As the repo growths, aliases become your life saver so it's better to add them from day one.

Imported GitHub PR comment. Original author: @marvin-hansen Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3392167102 Original created: 2025-10-10T20:06:16Z --- Just a quick note on the aliases, if there are no objections i add this over the weekend and add a note somewhere how to use them. As the repo growths, aliases become your life saver so it's better to add them from day one.
mfreeman451 commented 2025-10-10 20:22:06 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3392210002
Original created: 2025-10-10T20:22:06Z

Just a quick note on the aliases, if there are no objections i add this over the weekend and add a note somewhere how to use them. As the repo growths, aliases become your life saver so it's better to add them from day one.

that works for me, sorry forgot to respond to this one

Imported GitHub PR comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3392210002 Original created: 2025-10-10T20:22:06Z --- > Just a quick note on the aliases, if there are no objections i add this over the weekend and add a note somewhere how to use them. As the repo growths, aliases become your life saver so it's better to add them from day one. that works for me, sorry forgot to respond to this one
marvin-hansen commented 2025-10-11 08:42:30 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3393071384
Original created: 2025-10-11T08:42:30Z

Resolved in

https://github.com/carverauto/serviceradar/pull/1742

Imported GitHub PR comment. Original author: @marvin-hansen Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3393071384 Original created: 2025-10-11T08:42:30Z --- Resolved in https://github.com/carverauto/serviceradar/pull/1742

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!2303
No description provided.