adding missing assets to build #2297
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!2297
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2297/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: #1726
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1726
Original created: 2025-10-06T23:46:03Z
Original updated: 2025-10-07T00:10:02Z
Original head: carverauto/serviceradar:chore/missing_web_assets
Original base: main
Original merged: 2025-10-07T00:09:58Z by @mfreeman451
PR Type
Enhancement
Description
Fix web assets packaging with proper directory structure
Add strip_prefix configuration for public assets
Implement copy_to_directory for flattened public files
Update Docker build targets for correct asset paths
Diagram Walkthrough
File Walkthrough
packages.bzl
Add strip_prefix for web public assetspackaging/packages.bzl
strip_prefixconfiguration to web public assetsBUILD.bazel
Restructure web public assets packaging for Dockerdocker/images/BUILD.bazel
copy_to_directoryfrom aspect_bazel_libweb_public_flattarget to flatten public directory structureImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1726#issuecomment-3374661960
Original created: 2025-10-06T23:46:24Z
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/1726#issuecomment-3374663490
Original created: 2025-10-06T23:47:25Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Centralize asset path stripping logic
The asset path stripping logic is duplicated in two files. It should be
centralized in the source target,
//web:public_tree, to simplify consumers andprevent future inconsistencies.
Examples:
docker/images/BUILD.bazel [907-915]
packaging/packages.bzl [740]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies duplicated path-stripping logic in
docker/images/BUILD.bazelandpackaging/packages.bzl, proposing a superior, centralized solution that improves long-term maintainability.✅
Fix incorrect asset packaging pathSuggestion Impact:
The commit updated web_public_root_amd64 to package into /app/public (and similarly adjusted related targets), aligning with the suggestion’s intent. However, it did not add strip_prefix.code diff:
In the
web_public_root_amd64target, change the packaging logic to explicitlyset
package_dirto/app/publicand addstrip_prefix = "public"for betterclarity and robustness.
docker/images/BUILD.bazel [917-921]
[Suggestion processed]Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies that the current code and the proposed change produce the same output structure. The proposed change using
package_dirandstrip_prefixis a more explicit and robust pattern for packaging directory contents, improving maintainability.✅
Improve asset packaging path configurationSuggestion Impact:
The commit changed package_dir for web_public_standalone_amd64 to "/app/.next/standalone/public", aligning with the suggestion. However, it did not add strip_prefix; instead it switched srcs to use //web:public_flat.code diff:
In the
web_public_standalone_amd64target, make the packaging logic moreexplicit by setting
package_dirto the full path/app/.next/standalone/publicand adding
strip_prefix = "public".docker/images/BUILD.bazel [923-927]
[Suggestion processed]Suggestion importance[1-10]: 5
__
Why: Similar to the first suggestion, this proposes a more explicit and robust pattern for packaging directory contents by using
package_dirwith the full path andstrip_prefix. This improves the clarity and maintainability of the build configuration.