1683 chore bazel to push images to ghcrio #2261
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!2261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2261/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: #1684
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1684
Original created: 2025-10-03T03:54:47Z
Original updated: 2025-10-03T04:15:38Z
Original head: carverauto/serviceradar:1683-chore-bazel-to-push-images-to-ghcrio
Original base: main
Original merged: 2025-10-03T04:15:32Z by @mfreeman451
PR Type
Enhancement
Description
Configure Bazel to push container images to GHCR
Update RBE executor image to v1.0.9
Add Docker authentication setup for BuildBuddy
Fix protoc configuration for Rust builds
Diagram Walkthrough
File Walkthrough
4 files
Force protoc path for RBE buildsUpdate RBE image and add auth scriptUpdate RBE executor image versionUpdate OCaml platform executor image4 files
Docker authentication setup script for BuildBuddyGHCR push targets and multirun configurationAdd protobuf tools and GCC symlinksDeclare GHCR push targets1 files
Remove extra newline in remote config1 files
Update dependencies and GCC toolchain paths1 files
Documentation for GHCR publishing workflowImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1684#issuecomment-3364161783
Original created: 2025-10-03T03:55:49Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Credential handling risk
Description: The script writes Docker auth credentials to ~/.docker/config.json which, if not protected
by permissions or proper secret scoping, may expose GHCR credentials on shared runners or
logs; ensure restricted file perms and no echoing of secrets.
buildbuddy_setup_docker_auth.sh [15-41]
Referred Code
🎫 #1683
workflow.
without committing secrets.
RBE image.
images appear under ghcr.io/carverauto/*
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/1684#issuecomment-3364163291
Original created: 2025-10-03T03:56:56Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Make authentication explicit for push targets
Modify the authentication setup to have the script output the Docker config
file. Then, explicitly pass this file to the
docker_config_jsonattribute of theoci_pushtargets to create a clear and reliable dependency.Examples:
docker/images/push_targets.bzl [50-56]
buildbuddy_setup_docker_auth.sh [6-43]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 8
__
Why: This is a significant architectural improvement that makes the build more robust and hermetic by replacing an implicit, stateful dependency with an explicit one, which is a core principle of Bazel.
Merge credentials instead of overwriting config
Instead of overwriting the Docker
config.json, merge the new credentials usingjqto avoid deleting existing configurations for other registries.buildbuddy_setup_docker_auth.sh [35-43]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies that overwriting
config.jsonis destructive and proposes a safer, non-destructive update usingjq, which significantly improves the script's robustness for local development environments.Limit parallel jobs to prevent issues
Change
jobs = 0to a fixed number like4in themultiruntarget to preventnetwork saturation, registry rate-limiting, and local resource exhaustion when
pushing container images.
docker/images/push_targets.bzl [66-71]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that
jobs = 0inmultiruncan lead to issues like network saturation and rate limiting, and proposing a fixed limit is a sensible improvement for stability.