chore: bazel 9 upgrade #2995

Merged
mfreeman451 merged 4 commits from refs/pull/2995/head into staging 2026-03-01 02:57:22 +00:00
mfreeman451 commented 2026-03-01 01:15:59 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #2954
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2954
Original created: 2026-03-01T01:15:59Z
Original updated: 2026-03-01T02:57:42Z
Original head: carverauto/serviceradar:2446-chore-upgrade-to-bazel-9
Original base: staging
Original merged: 2026-03-01T02:57:22Z by @mfreeman451

User description

IMPORTANT: Please sign the Developer Certificate of Origin

Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:

Signed-off-by: J. Doe <j.doe@domain.com>

Describe your changes

Code checklist before requesting a review

  • I have signed the DCO?
  • The build completes without errors?
  • All tests are passing when running make test?

PR Type

Enhancement


Description

  • Upgrade Bazel from version 8.4.1 to 9.0.0

  • Update multiple Bazel dependencies to compatible versions

  • Add repo contents cache configuration flag

  • Fix import statements and module ordering in BUILD files


Diagram Walkthrough

flowchart LR
  A["Bazel 8.4.1"] -- "upgrade" --> B["Bazel 9.0.0"]
  B -- "update dependencies" --> C["MODULE.bazel"]
  C -- "add cache config" --> D[".bazelrc"]
  C -- "fix imports" --> E["BUILD.bazel files"]

File Walkthrough

Relevant files
Configuration changes
.bazelversion
Bump Bazel version to 9.0.0                                                           

.bazelversion

  • Update Bazel version from 8.4.1 to 9.0.0
+1/-1     
.bazelrc
Add repo contents cache configuration                                       

.bazelrc

  • Add new repo_contents_cache configuration flag
+1/-0     
Dependencies
MODULE.bazel
Update Bazel dependencies for version 9 compatibility       

MODULE.bazel

  • Update rules_python from 1.6.1 to 1.7.0
  • Update protobuf from 29.1 to 33.4
  • Update bazel_features from 1.32.0 to 1.33.0
  • Update rules_java from 8.14.0 to 9.0.3
  • Update swiftlint from 0.52.4 to 0.63.2
  • Update rules_shell from 0.4.1 to 0.6.1
  • Update bazel_skylib from 1.8.1 to 1.9.0
  • Update rules_foreign_cc from 0.9.0 to 0.15.1
  • Update rules_cc from 0.2.4 to 0.2.16
  • Update aspect_bazel_lib from 2.14.0 to 2.22.5
  • Reorder serviceradar_cert_generator_linux_amd64 in use_repo list
  • Add blank line after llvm_toolchain registration
  • Add blank line after rust_crates use_repo block
+13/-11 
Error handling
BUILD.bazel
Add missing shell test import                                                       

docs/BUILD.bazel

  • Add import for sh_test from @rules_shell//shell:sh_test.bzl
+2/-0     
BUILD.bazel
Add missing shell test import                                                       

elixir/web-ng/BUILD.bazel

  • Add import for sh_test from @rules_shell//shell:sh_test.bzl
+1/-0     
BUILD.bazel
Add missing C++ library import                                                     

go/pkg/cpufreq/BUILD.bazel

  • Add import for cc_library from @rules_cc//cc:defs.bzl
+1/-0     

Imported from GitHub pull request. Original GitHub pull request: #2954 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/2954 Original created: 2026-03-01T01:15:59Z Original updated: 2026-03-01T02:57:42Z Original head: carverauto/serviceradar:2446-chore-upgrade-to-bazel-9 Original base: staging Original merged: 2026-03-01T02:57:22Z by @mfreeman451 --- ### **User description** ## IMPORTANT: Please sign the Developer Certificate of Origin Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include a [DCO sign-off statement]( https://developercertificate.org/) indicating the DCO acceptance in one commit message. Here is an example DCO Signed-off-by line in a commit message: ``` Signed-off-by: J. Doe <j.doe@domain.com> ``` ## Describe your changes ## Issue ticket number and link ## Code checklist before requesting a review - [ ] I have signed the DCO? - [ ] The build completes without errors? - [ ] All tests are passing when running make test? ___ ### **PR Type** Enhancement ___ ### **Description** - Upgrade Bazel from version 8.4.1 to 9.0.0 - Update multiple Bazel dependencies to compatible versions - Add repo contents cache configuration flag - Fix import statements and module ordering in BUILD files ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Bazel 8.4.1"] -- "upgrade" --> B["Bazel 9.0.0"] B -- "update dependencies" --> C["MODULE.bazel"] C -- "add cache config" --> D[".bazelrc"] C -- "fix imports" --> E["BUILD.bazel files"] ``` <details><summary><h3>File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>.bazelversion</strong><dd><code>Bump Bazel version to 9.0.0</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; </dd></summary> <hr> .bazelversion - Update Bazel version from 8.4.1 to 9.0.0 </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-c3633fb973fb6f3cf898f53da86fa77e9310338a7c2933143709d5e226f05f75">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>.bazelrc</strong><dd><code>Add repo contents cache configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> .bazelrc - Add new `repo_contents_cache` configuration flag </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832f">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Dependencies</strong></td><td><table> <tr> <td> <details> <summary><strong>MODULE.bazel</strong><dd><code>Update Bazel dependencies for version 9 compatibility</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> MODULE.bazel <ul><li>Update <code>rules_python</code> from 1.6.1 to 1.7.0<br> <li> Update <code>protobuf</code> from 29.1 to 33.4<br> <li> Update <code>bazel_features</code> from 1.32.0 to 1.33.0<br> <li> Update <code>rules_java</code> from 8.14.0 to 9.0.3<br> <li> Update <code>swiftlint</code> from 0.52.4 to 0.63.2<br> <li> Update <code>rules_shell</code> from 0.4.1 to 0.6.1<br> <li> Update <code>bazel_skylib</code> from 1.8.1 to 1.9.0<br> <li> Update <code>rules_foreign_cc</code> from 0.9.0 to 0.15.1<br> <li> Update <code>rules_cc</code> from 0.2.4 to 0.2.16<br> <li> Update <code>aspect_bazel_lib</code> from 2.14.0 to 2.22.5<br> <li> Reorder <code>serviceradar_cert_generator_linux_amd64</code> in use_repo list<br> <li> Add blank line after llvm_toolchain registration<br> <li> Add blank line after rust_crates use_repo block</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdc">+13/-11</a>&nbsp; </td> </tr> </table></td></tr><tr><td><strong>Error handling</strong></td><td><table> <tr> <td> <details> <summary><strong>BUILD.bazel</strong><dd><code>Add missing shell test import</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></summary> <hr> docs/BUILD.bazel - Add import for `sh_test` from `@rules_shell//shell:sh_test.bzl` </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-f8ca881095fec0f1448b91970239419034e141839711f602e8cbc5131d1c061f">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>BUILD.bazel</strong><dd><code>Add missing shell test import</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></summary> <hr> elixir/web-ng/BUILD.bazel - Add import for `sh_test` from `@rules_shell//shell:sh_test.bzl` </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-d12daeeca6f26c960616be37e78c01a6d554e34a85e12ebadc4273b5a078e216">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>BUILD.bazel</strong><dd><code>Add missing C++ library import</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></summary> <hr> go/pkg/cpufreq/BUILD.bazel - Add import for `cc_library` from `@rules_cc//cc:defs.bzl` </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2954/files#diff-f19fc5e7d63c09fb874a5f74cab9d096348ceae1e751d5956cdd9e3587536e73">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2026-03-01 01:16:26 +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/2954#issuecomment-3978786208
Original created: 2026-03-01T01:16:26Z

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
🟢
🎫 #2446
🟢 Upgrade Bazel from 8.4.1 to 9.0.0.
Update Bazel module/dependencies to versions compatible with Bazel 9.
Add repo contents cache configuration flag.
Fix/update BUILD file load/import statements and ordering as needed for the upgrade.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • 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/2954#issuecomment-3978786208 Original created: 2026-03-01T01:16:26Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/dd9ac09107572e810024f46908dae713ecfe4a12 --> 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>🎫 <a href=https://github.com/carverauto/serviceradar/issues/2446>#2446</a></summary> <table width='100%'><tbody> <tr><td rowspan=4>🟢</td> <td>Upgrade Bazel from 8.4.1 to 9.0.0. </td></tr> <tr><td>Update Bazel module/dependencies to versions compatible with Bazel 9. </td></tr> <tr><td>Add repo contents cache configuration flag. </td></tr> <tr><td>Fix/update BUILD file load/import statements and ordering as needed for the upgrade. </td></tr> </tbody></table> </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 rowspan=6>🟢</td><td> <details><summary><strong>Generic: Comprehensive Audit Trails</strong></summary><br> **Objective:** To create a detailed and reliable record of critical system actions for security analysis <br>and compliance.<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Meaningful Naming and Self-Documenting Code</strong></summary><br> **Objective:** Ensure all identifiers clearly express their purpose and intent, making code <br>self-documenting<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Robust Error Handling and Edge Case Management</strong></summary><br> **Objective:** Ensure comprehensive error handling that provides meaningful context and graceful <br>degradation<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Secure Error Handling</strong></summary><br> **Objective:** To prevent the leakage of sensitive system information through error messages while <br>providing sufficient detail for internal debugging.<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Secure Logging Practices</strong></summary><br> **Objective:** To ensure logs are useful for debugging and auditing without exposing sensitive <br>information like PII, PHI, or cardholder data.<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Security-First Input Validation and Data Handling</strong></summary><br> **Objective:** Ensure all data inputs are validated, sanitized, and handled securely to prevent <br>vulnerabilities<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </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 2026-03-01 01:17:10 +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/2954#issuecomment-3978787479
Original created: 2026-03-01T01:17:10Z

PR Code Suggestions

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Provide an explicit path for cache

Provide an explicit path for the --repo_contents_cache flag instead of leaving
it empty to ensure predictable caching behavior.

.bazelrc [12]

-common --repo_contents_cache=
+common --repo_contents_cache=third_party/bazel-repo-contents-cache
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that an empty value for --repo_contents_cache is ambiguous and provides a concrete path, improving configuration clarity and preventing potential errors.

Low
  • Update
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/2954#issuecomment-3978787479 Original created: 2026-03-01T01:17:10Z --- ## PR Code Suggestions ✨ <!-- dd9ac09 --> 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>General</td> <td> <details><summary>Provide an explicit path for cache</summary> ___ **Provide an explicit path for the <code>--repo_contents_cache</code> flag instead of leaving <br>it empty to ensure predictable caching behavior.** [.bazelrc [12]](https://github.com/carverauto/serviceradar/pull/2954/files#diff-544556920c45b42cbfe40159b082ce8af6bd929e492d076769226265f215832fR12-R12) ```diff -common --repo_contents_cache= +common --repo_contents_cache=third_party/bazel-repo-contents-cache ``` - [ ] **Apply / Chat** <!-- /improve --apply_suggestion=0 --> <details><summary>Suggestion importance[1-10]: 6</summary> __ Why: The suggestion correctly identifies that an empty value for `--repo_contents_cache` is ambiguous and provides a concrete path, improving configuration clarity and preventing potential errors. </details></details></td><td align=center>Low </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!2995
No description provided.