sha tag build ids #2326
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!2326
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2326/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: #1782
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1782
Original created: 2025-10-16T05:35:28Z
Original updated: 2025-10-16T05:38:09Z
Original head: carverauto/serviceradar:1776-bugbuilds-build-info-build-id-not-changing-with-bazel-builds
Original base: main
Original merged: 2025-10-16T05:38:06Z by @mfreeman451
PR Type
Enhancement, Bug fix
Description
Implement SHA-based build IDs for web and core images using digest values
Add dynamic
build-info.jsongeneration with web and core build IDsFix build info file handling in entrypoint script to prevent overwrites
Update sidebar to display separate web and core build identifiers
Diagram Walkthrough
File Walkthrough
BUILD.bazel
Generate build-info.json from image digests and layer into web imagedocker/images/BUILD.bazel
web_image_amd64into base image and final image with build infolayers
web_build_info_jsongenrule to generate build-info.json from imagedigests
directories
push_targets.bzl
Support custom digest labels for image push targetsdocker/images/push_targets.bzl
GHCR_PUSH_TARGETSto support custom digest labelsdeclare_ghcr_push_targetsto handle optional third tupleelement
web_image_base_amd64.digestinstead of defaultworkspace_status.sh
Add version and timestamp variables to workspace statusscripts/workspace_status.sh
STABLE_VERSIONoutput from VERSION file or default to "dev"STABLE_BUILD_IDoutput from BUILD_ID environment variableBUILD_TIMESTAMPandBUILD_TIMESTAMP_COMPACToutputs with currentUTC time
build-info.json
Split build ID into separate web and core identifiersweb/public/build-info.json
buildIdfield to separatewebBuildIdandcoreBuildIdfieldsSidebar.tsx
Display separate web and core build IDs in sidebarweb/src/components/Sidebar.tsx
BuildInfotype withwebBuildIdandcoreBuildIdfieldsentrypoint-web.sh
Preserve build-info.json during public asset flatteningdocker/compose/entrypoint-web.sh
build-info.jsonbefore flattening public assetsbuild-info.jsonback to nested location after flatteningImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1782#issuecomment-3409246145
Original created: 2025-10-16T05:36:11Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
JSON injection/breakage
Description: The genrule constructs JSON by string interpolation without escaping, which could break
JSON if VERSION or other inputs contain quotes or special characters; use a JSON-safe
generator or escaping to prevent malformed files.
BUILD.bazel [1032-1072]
Referred Code
🎫 #1776
new builds.
builds.
preserved after asset flattening at runtime.
builds in deployed environments.
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/1782#issuecomment-3409247817
Original created: 2025-10-16T05:37:10Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Code Suggestions ✨
Explore these optional code suggestions:
Simplify the complex build process
The build process has become overly complex by using four tar layers for one
file and an entrypoint script for file manipulation. This should be simplified
by adjusting the Bazel build rules to create the correct directory structure
directly, which would improve robustness and maintainability.
Examples:
docker/images/BUILD.bazel [1075-1128]
docker/compose/entrypoint-web.sh [135-151]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a significant increase in complexity in the build process, involving four redundant
pkg_tarlayers and runtime file manipulation, and proposes a more robust and maintainable architectural solution.Use async/await for data fetching
Refactor the
fetchcall withinReact.useEffectto useasync/awaitsyntax insteadof
.then()and.catch()for improved readability and error handling.web/src/components/Sidebar.tsx [52-57]
Suggestion importance[1-10]: 5
__
Why: The suggestion refactors the data fetching logic to use
async/await, which improves readability and aligns with modern JavaScript practices.Simplify SHA hash truncation logic
Simplify the two-step SHA hash truncation into a single line by piping the
output of the parameter expansion directly to
cut.docker/images/BUILD.bazel [1044-1045]
Suggestion importance[1-10]: 3
__
Why: The suggestion correctly combines two lines into one for conciseness, but the improvement is minor and replaces the more robust
printfwithecho.