Resolved pr 1740 #2304

Merged
mfreeman451 merged 26 commits from refs/pull/2304/head into main 2025-10-11 06:28:45 +00:00
mfreeman451 commented 2025-10-11 05:44:50 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #1742
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1742
Original created: 2025-10-11T05:44:50Z
Original updated: 2025-10-11T06:28:49Z
Original head: carverauto/serviceradar:resolved-pr-1740
Original base: main
Original merged: 2025-10-11T06:28:45Z by @mfreeman451

PR Type

Enhancement, Other


Description

  • Reorganized build configuration files into build/ directory

  • Updated Bazel dependencies and toolchain configurations

  • Fixed Rust code lints and build script updates

  • Added comprehensive build documentation


Diagram Walkthrough

flowchart LR
  A["Old Structure"] --> B["build/ Directory"]
  B --> C["Updated Bazel Configs"]
  C --> D["Fixed Toolchain Paths"]
  D --> E["Enhanced Dependencies"]

File Walkthrough

Relevant files
Formatting
1 files
tests.rs
Remove unnecessary mut from closure                                           
+1/-1     
Bug fix
2 files
build.rs
Update tonic build method call                                                     
+1/-1     
BUILD
Fix OCaml platform parent references                                         
+2/-2     
Configuration changes
4 files
release_pipeline.sh
Update Bazel binary path reference                                             
+1/-1     
.bazelrc
Update RBE platform paths                                                               
+2/-2     
workflows.yaml
Update buildbuddy release pipeline path                                   
+1/-1     
MODULE.bazel
Reorganize dependencies and update toolchain configurations
+37/-49 
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: #1742 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/1742 Original created: 2025-10-11T05:44:50Z Original updated: 2025-10-11T06:28:49Z Original head: carverauto/serviceradar:resolved-pr-1740 Original base: main Original merged: 2025-10-11T06:28:45Z by @mfreeman451 --- ### **PR Type** Enhancement, Other ___ ### **Description** - Reorganized build configuration files into `build/` directory - Updated Bazel dependencies and toolchain configurations - Fixed Rust code lints and build script updates - Added comprehensive build documentation ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Old Structure"] --> B["build/ Directory"] B --> C["Updated Bazel Configs"] C --> D["Fixed Toolchain Paths"] D --> E["Enhanced Dependencies"] ``` <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 unnecessary mut from closure</code>&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/1742/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>2 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/1742/files#diff-660177a66a475c1af352388464e4dcf4fab913c3411b6f1315322dba0013c220">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>BUILD</strong><dd><code>Fix OCaml 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; </dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1742/files#diff-ac0d5204dc44afc495e4f6899ae668175ade69fa6b3324c94261ae2461586a21">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>4 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/1742/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/1742/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832f">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>workflows.yaml</strong><dd><code>Update buildbuddy release pipeline path</code>&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/1742/files#diff-ab6de3b3c2e87a5324595cc6b8656ab7bae1dee7d0c60e0626128e634f71711d">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>MODULE.bazel</strong><dd><code>Reorganize dependencies and update toolchain configurations</code></dd></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1742/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdc">+37/-49</a>&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/1742/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/1742/files#diff-7db9ba13f8695c024ba5bf51ac9d01d9e9e9d4a5ef80c2d11f6da4a0c2222a8a">[link]</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>bazel</strong></td> <td><a href="https://github.com/carverauto/serviceradar/pull/1742/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/1742/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/1742/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/1742/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/1742/files#diff-214d6cbad7dbfa70bcb6bda0479bdd95531e028671f976ff894bb68c3f3be5b4">[link]</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2025-10-11 05:45:23 +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/1742#issuecomment-3392942362
Original created: 2025-10-11T05:45:23Z

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.

  • Update
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/1742#issuecomment-3392942362 Original created: 2025-10-11T05:45:23Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/491c932c5024743095a2bc3aa86af132c10af742 --> 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"> - [ ] Update <!-- /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-11 05:46:22 +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/1742#issuecomment-3392944568
Original created: 2025-10-11T05:46:22Z

PR Code Suggestions

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Clarify and isolate platform support changes

The PR removes macOS build support by deleting rules_apple and updating
documentation, but this major change is not mentioned in the description. This
should be handled in a separate PR for clarity and proper review.

Examples:

MODULE.bazel [75-86]
# --- RPM & package Toolchain  ----------------------------------

find_rpm = use_extension("@rules_pkg//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod")
use_repo(find_rpm, "rules_pkg_rpmbuild")

register_toolchains("@rules_pkg_rpmbuild//:all")

# --- CC Toolchain  ----------------------------------

cc_configure_ext = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")

 ... (clipped 2 lines)
BUILD.md [3]
* Currently, only linux on x86_64 is supported.

Solution Walkthrough:

Before:

// MODULE.bazel
module(...)

// Core language ecosystems
bazel_dep(name = "rules_go", ...)
// ...
// bazel_dep(name = "rules_apple", ...) is removed
// bazel_dep(name = "apple_support", ...) is removed
// ...
// apple = use_extension(...) is removed
// apple.toolchain() is removed

// BUILD.md (new file)
# Building the project
* Currently, only linux on x86_64 is supported.

After:

// MODULE.bazel
module(...)

// Core language ecosystems
bazel_dep(name = "rules_go", ...)
// ...
bazel_dep(name = "rules_apple", version = "3.18.0")
bazel_dep(name = "apple_support", version = "1.23.0")
// ...
apple = use_extension("@rules_apple//apple:extensions.bzl", "apple")
apple.toolchain()


// BUILD.md (new file)
# Building the project
// The line "* Currently, only linux on x86_64 is supported." is removed or rephrased to include other platforms.

Suggestion importance[1-10]: 9

__

Why: This suggestion correctly identifies a critical, undocumented change—the removal of macOS support—which has a major impact on the project's scope and is hidden within a refactoring PR.

High
Possible issue
Fix incorrect Bazelisk download URL

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

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]: 7

__

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

Medium
  • Update
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/1742#issuecomment-3392944568 Original created: 2025-10-11T05:46:22Z --- ## PR Code Suggestions ✨ <!-- 491c932 --> 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>Clarify and isolate platform support changes</summary> ___ **The PR removes macOS build support by deleting <code>rules_apple</code> and updating <br>documentation, but this major change is not mentioned in the description. This <br>should be handled in a separate PR for clarity and proper review.** ### Examples: <details> <summary> <a href="https://github.com/carverauto/serviceradar/pull/1742/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR75-R86">MODULE.bazel [75-86]</a> </summary> ```starlark # --- RPM & package Toolchain ---------------------------------- find_rpm = use_extension("@rules_pkg//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod") use_repo(find_rpm, "rules_pkg_rpmbuild") register_toolchains("@rules_pkg_rpmbuild//:all") # --- CC Toolchain ---------------------------------- cc_configure_ext = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension") ... (clipped 2 lines) ``` </details> <details> <summary> <a href="https://github.com/carverauto/serviceradar/pull/1742/files#diff-40f60e1037245d7b8a98a7325d53890a717da9979adeb54a61a795c4ba07f9c9R3-R3">BUILD.md [3]</a> </summary> ```markdown * Currently, only linux on x86_64 is supported. ``` </details> ### Solution Walkthrough: #### Before: ```markdown // MODULE.bazel module(...) // Core language ecosystems bazel_dep(name = "rules_go", ...) // ... // bazel_dep(name = "rules_apple", ...) is removed // bazel_dep(name = "apple_support", ...) is removed // ... // apple = use_extension(...) is removed // apple.toolchain() is removed // BUILD.md (new file) # Building the project * Currently, only linux on x86_64 is supported. ``` #### After: ```markdown // MODULE.bazel module(...) // Core language ecosystems bazel_dep(name = "rules_go", ...) // ... bazel_dep(name = "rules_apple", version = "3.18.0") bazel_dep(name = "apple_support", version = "1.23.0") // ... apple = use_extension("@rules_apple//apple:extensions.bzl", "apple") apple.toolchain() // BUILD.md (new file) # Building the project // The line "* Currently, only linux on x86_64 is supported." is removed or rephrased to include other platforms. ``` <details><summary>Suggestion importance[1-10]: 9</summary> __ Why: This suggestion correctly identifies a critical, undocumented change—the removal of macOS support—which has a major impact on the project's scope and is hidden within a refactoring PR. </details></details></td><td align=center>High </td></tr><tr><td rowspan=1>Possible issue</td> <td> <details><summary>Fix incorrect Bazelisk download URL</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> to fix the broken link.** [BUILD.md [11]](https://github.com/carverauto/serviceradar/pull/1742/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]: 7</summary> __ Why: The suggestion correctly identifies a broken download URL in the new build instructions, which would prevent users from setting up the project. </details></details></td><td align=center>Medium </td></tr> <tr><td align="center" colspan="2"> - [ ] Update <!-- /improve_multi --more_suggestions=true --> </td><td></td></tr></tbody></table>
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!2304
No description provided.