bazel build fixes #2529

Merged
mfreeman451 merged 2 commits from refs/pull/2529/head into main 2025-12-08 18:01:05 +00:00
mfreeman451 commented 2025-12-08 16:46:20 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #2086
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2086
Original created: 2025-12-08T16:46:20Z
Original updated: 2025-12-08T18:01:11Z
Original head: carverauto/serviceradar:chore/build_failing_dec8
Original base: main
Original merged: 2025-12-08T18:01:05Z 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

  • Remove unused org_golang_x_sync dependency from Bazel configuration

  • Clean up unused errgroup imports from build targets

  • Simplify MODULE.bazel and package BUILD files


Diagram Walkthrough

flowchart LR
  A["Bazel Build Configuration"] -->|Remove unused dep| B["MODULE.bazel"]
  A -->|Remove errgroup refs| C["pkg/registry/BUILD.bazel"]
  A -->|Remove errgroup refs| D["pkg/sync/BUILD.bazel"]
  B --> E["Cleaner dependency tree"]
  C --> E
  D --> E

File Walkthrough

Relevant files
Dependencies
MODULE.bazel
Remove unused org_golang_x_sync dependency                             

MODULE.bazel

  • Removed org_golang_x_sync from use_repo() declaration
  • Eliminates unused external dependency reference
+0/-1     
BUILD.bazel
Remove errgroup dependency from registry targets                 

pkg/registry/BUILD.bazel

  • Removed @org_golang_x_sync//errgroup from go_library deps
  • Removed @org_golang_x_sync//errgroup from go_test deps
  • Cleans up unused error group imports
+0/-2     
BUILD.bazel
Remove errgroup dependency from sync target                           

pkg/sync/BUILD.bazel

  • Removed @org_golang_x_sync//errgroup from go_library deps
  • Eliminates unused error group import
+0/-1     

Imported from GitHub pull request. Original GitHub pull request: #2086 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/2086 Original created: 2025-12-08T16:46:20Z Original updated: 2025-12-08T18:01:11Z Original head: carverauto/serviceradar:chore/build_failing_dec8 Original base: main Original merged: 2025-12-08T18:01:05Z 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** - Remove unused `org_golang_x_sync` dependency from Bazel configuration - Clean up unused `errgroup` imports from build targets - Simplify MODULE.bazel and package BUILD files ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Bazel Build Configuration"] -->|Remove unused dep| B["MODULE.bazel"] A -->|Remove errgroup refs| C["pkg/registry/BUILD.bazel"] A -->|Remove errgroup refs| D["pkg/sync/BUILD.bazel"] B --> E["Cleaner dependency tree"] C --> E D --> E ``` <details><summary><h3>File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table> <tr> <td> <details> <summary><strong>MODULE.bazel</strong><dd><code>Remove unused org_golang_x_sync dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> MODULE.bazel <ul><li>Removed <code>org_golang_x_sync</code> from <code>use_repo()</code> declaration<br> <li> Eliminates unused external dependency reference</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2086/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdc">+0/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>BUILD.bazel</strong><dd><code>Remove errgroup dependency from registry targets</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> pkg/registry/BUILD.bazel <ul><li>Removed <code>@org_golang_x_sync//errgroup</code> from go_library deps<br> <li> Removed <code>@org_golang_x_sync//errgroup</code> from go_test deps<br> <li> Cleans up unused error group imports</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2086/files#diff-3e838afce9a84935e04b7ff8fd3e48d5452c21538a3ea1d36e3fd00aa3c30cd0">+0/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>BUILD.bazel</strong><dd><code>Remove errgroup dependency from sync target</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> pkg/sync/BUILD.bazel <ul><li>Removed <code>@org_golang_x_sync//errgroup</code> from go_library deps<br> <li> Eliminates unused error group import</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2086/files#diff-47b30fe972944b35a3c457ff5691fba8d89aa7d65755209a9d8136bdcdcf1489">+0/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2025-12-08 16:46:53 +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/2086#issuecomment-3627984364
Original created: 2025-12-08T16:46:53Z

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
🟢
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: 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: Comprehensive Audit Trails

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

Status:
No runtime code: The PR only updates Bazel build configuration and dependencies without adding or modifying
runtime logic where audit trails could be implemented or affected.

Referred Code
    "io_opentelemetry_go_otel_sdk_log",
    "io_opentelemetry_go_otel_sdk_metric",
    "io_opentelemetry_go_otel_trace",
    "io_opentelemetry_go_proto_otlp",
    "org_golang_google_grpc",
    "org_golang_google_protobuf",
    "org_golang_x_crypto",
    "org_golang_x_net",
    "org_golang_x_sys",
    "org_uber_go_mock",
)

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:
Build-only changes: Only BUILD and MODULE files were updated to remove dependencies, with no new executable
code to assess error handling.

Referred Code
    "@com_github_cenkalti_backoff_v5//:backoff",
    "@com_github_google_uuid//:uuid",
    "@com_github_rs_zerolog//:zerolog",
    "@io_opentelemetry_go_otel//:go_default_library",
    "@io_opentelemetry_go_otel_metric//:go_default_library",
    "@org_golang_google_grpc//:grpc",
    "@org_golang_google_grpc//codes:go_default_library",
    "@org_golang_google_grpc//status:go_default_library",
    "@org_uber_go_mock//gomock",
    "@com_github_jackc_pgx_v5//pgconn:go_default_library",
],

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:
No user errors here: The diff affects only Bazel dependencies and does not introduce or modify user-facing
error messages to evaluate.

Referred Code
    "//pkg/models",
    "//pkg/sync/integrations/armis",
    "//pkg/sync/integrations/netbox",
    "//proto",
    "@org_golang_google_grpc//:grpc",
    "@org_golang_google_grpc//codes",
    "@org_golang_google_grpc//metadata",
    "@org_golang_google_grpc//status",
    "@org_uber_go_mock//gomock",
],

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:
No input paths: The PR only adjusts dependency lists in build files, with no new input handling or data
processing code to validate security practices.

Referred Code
    "io_opentelemetry_go_otel_sdk_log",
    "io_opentelemetry_go_otel_sdk_metric",
    "io_opentelemetry_go_otel_trace",
    "io_opentelemetry_go_proto_otlp",
    "org_golang_google_grpc",
    "org_golang_google_protobuf",
    "org_golang_x_crypto",
    "org_golang_x_net",
    "org_golang_x_sys",
    "org_uber_go_mock",
)

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/2086#issuecomment-3627984364 Original created: 2025-12-08T16:46:53Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/d22d3eafcf516c2e44bbbd372a456b9d3ad1b6d2 --> 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 </strong></summary> - [ ] 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 rowspan=2>🟢</td><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: 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 rowspan=4>⚪</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:** <br><a href='https://github.com/carverauto/serviceradar/pull/2086/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR367-R377'><strong>No runtime code</strong></a>: The PR only updates Bazel build configuration and dependencies without adding or modifying <br>runtime logic where audit trails could be implemented or affected.<br> <details open><summary>Referred Code</summary> ```txt "io_opentelemetry_go_otel_sdk_log", "io_opentelemetry_go_otel_sdk_metric", "io_opentelemetry_go_otel_trace", "io_opentelemetry_go_proto_otlp", "org_golang_google_grpc", "org_golang_google_protobuf", "org_golang_x_crypto", "org_golang_x_net", "org_golang_x_sys", "org_uber_go_mock", ) ``` </details> > 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:** <br><a href='https://github.com/carverauto/serviceradar/pull/2086/files#diff-3e838afce9a84935e04b7ff8fd3e48d5452c21538a3ea1d36e3fd00aa3c30cd0R18-R28'><strong>Build-only changes</strong></a>: Only BUILD and MODULE files were updated to remove dependencies, with no new executable <br>code to assess error handling.<br> <details open><summary>Referred Code</summary> ```txt "@com_github_cenkalti_backoff_v5//:backoff", "@com_github_google_uuid//:uuid", "@com_github_rs_zerolog//:zerolog", "@io_opentelemetry_go_otel//:go_default_library", "@io_opentelemetry_go_otel_metric//:go_default_library", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", "@org_uber_go_mock//gomock", "@com_github_jackc_pgx_v5//pgconn:go_default_library", ], ``` </details> > 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:** <br><a href='https://github.com/carverauto/serviceradar/pull/2086/files#diff-47b30fe972944b35a3c457ff5691fba8d89aa7d65755209a9d8136bdcdcf1489R24-R33'><strong>No user errors here</strong></a>: The diff affects only Bazel dependencies and does not introduce or modify user-facing <br>error messages to evaluate.<br> <details open><summary>Referred Code</summary> ```txt "//pkg/models", "//pkg/sync/integrations/armis", "//pkg/sync/integrations/netbox", "//proto", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//metadata", "@org_golang_google_grpc//status", "@org_uber_go_mock//gomock", ], ``` </details> > 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:** <br><a href='https://github.com/carverauto/serviceradar/pull/2086/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR367-R377'><strong>No input paths</strong></a>: The PR only adjusts dependency lists in build files, with no new input handling or data <br>processing code to validate security practices.<br> <details open><summary>Referred Code</summary> ```txt "io_opentelemetry_go_otel_sdk_log", "io_opentelemetry_go_otel_sdk_metric", "io_opentelemetry_go_otel_trace", "io_opentelemetry_go_proto_otlp", "org_golang_google_grpc", "org_golang_google_protobuf", "org_golang_x_crypto", "org_golang_x_net", "org_golang_x_sys", "org_uber_go_mock", ) ``` </details> > 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 2025-12-08 16:47:04 +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/2086#issuecomment-3627985427
Original created: 2025-12-08T16:47:04Z

PR Code Suggestions

No code suggestions found for the PR.

Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/2086#issuecomment-3627985427 Original created: 2025-12-08T16:47:04Z --- ## PR Code Suggestions ✨ No code suggestions found for the PR.
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!2529
No description provided.