Consolidated most bazel configs in new build folder #2303
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2303/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 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
]
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
]
regardless of where that tool resides.
PR Type
Enhancement
Description
Consolidated Bazel configuration files into
build/folderUpdated path references from
tools/tobuild/Added comprehensive build documentation and dependencies
Reorganized MODULE.bazel with better structure and comments
Diagram Walkthrough
File Walkthrough
1 files
Remove unused mut keyword from closure1 files
Update tonic_build method call5 files
Update bazel binary path referenceUpdate RBE platform pathsUpdate buildbuddy target pathReorganize dependencies with better structureUpdate platform parent references1 files
Add comprehensive build documentation6 files
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:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
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-3388609358
Original created: 2025-10-10T07:19:44Z
PR Code Suggestions ✨
Explore these optional code suggestions:
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]
.buildbuddy/workflows.yaml [22]
Solution Walkthrough:
Before:
After:
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.
Fix broken Bazelisk download link
Update the Bazelisk download URL in
BUILD.mdfrom the non-existent versionv1.27.0to a valid version likev1.19.0.BUILD.md [11]
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.
Make protoc pathing robust
To prevent build failures in hermetic environments, ensure
protocis findable bytonic_buildby configuring the build to set thePROTOCandPROTOC_INCLUDEenvironment variables.
cmd/poller-ng/build.rs [26-30]
[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.
Prevent hard-fail on missing platform
Verify that the new Bazel platform target
//build/rbe:rbe_platformis correctlydefined to prevent remote build failures. Consider adding a comment or a
fallback mechanism.
.bazelrc [54-55]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly asks the user to verify that the newly referenced Bazel target
//build/rbe:rbe_platformexists, which is a valid and important check during a build system refactor.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
(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-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: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1740#issuecomment-3392210002
Original created: 2025-10-10T20:22:06Z
that works for me, sorry forgot to respond to this one
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