Build/core rpm build failing #2238
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!2238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2238/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: #1658
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1658
Original created: 2025-09-24T17:16:59Z
Original updated: 2025-09-24T17:25:40Z
Original head: carverauto/serviceradar:build/core_rpm_build_failing
Original base: main
Original merged: 2025-09-24T17:25:36Z by @mfreeman451
PR Type
Enhancement
Description
Enhanced Kong artifact fetching with configurable versions
Added support for both enterprise and community Kong packages
Fixed RPM build dependencies across all spec files
Created new Kong wrapper package specification
Diagram Walkthrough
File Walkthrough
3 files
Enhanced artifact fetching with configurable versionsAdded systemd-rpm-macros and empty build handlingCreated new Kong wrapper package specification1 files
Updated Kong package configuration structure1 files
Updated documentation for new artifact fetching21 files
Fixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsFixed systemd build requirementsImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1658#issuecomment-3329932449
Original created: 2025-09-24T17:17:40Z
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
Robustness
URLs and version/channel derivation are hard-coded patterns; if upstream paths change or alternate distros are needed, downloads will silently fail later. Consider validating HTTP status and artifact integrity (e.g., checksum support) and allowing distro/codename/OS arch to be parameterized.
Build Path Handling
The conditional skip when BINARY_PATH is empty creates a .keep file, but subsequent RPM stages may expect binaries/artifacts. Ensure downstream steps tolerate empty outputs or fail fast with a clear error when a component actually requires a binary.
Source Path Assumptions
The spec copies files from %{_sourcedir}/packaging/... which presumes the full repo layout is present in SOURCES. This may fail under typical rpmbuild flows where only listed Source files are staged. Consider using Source entries or bundling via tarball to ensure files exist.
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1658#issuecomment-3329935875
Original created: 2025-09-24T17:18:43Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Avoid bundling unnecessary package formats
The
serviceradar-kong.specfile should be modified to only include.rpmartifacts in the final RPM package, excluding
.debfiles to reduce unnecessarypackage size.
Examples:
packaging/specs/serviceradar-kong.spec [38-46]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies a significant flaw in the new
serviceradar-kong.specfile, where unnecessary.debfiles are bundled into the RPM package, leading to package bloat.Use find instead of overlapping globs
Replace the
forloop with overlapping shell globs with afindcommand to preventartifacts from being processed multiple times.
packaging/specs/serviceradar-kong.spec [37-46]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies that the shell globbing patterns overlap, which could lead to processing files multiple times. Using
findis a more robust way to handle this, as it processes each found file only once, solving the immediate issue.Use explicit return code in function
In the
downloadfunction, change the implicitreturnto an explicitreturn 0toclearly indicate a successful exit when a download is skipped.
scripts/fetch-kong-artifacts.sh [14-26]
Suggestion importance[1-10]: 3
__
Why: The suggestion correctly points out that an explicit
return 0is better practice than an implicit one. However, the script hasset -eenabled, so ifechowere to fail, the script would exit, making the implicit return safe in this context. The change improves clarity but has a minor impact.Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1658#issuecomment-3329939374
Original created: 2025-09-24T17:19:46Z
CI Feedback 🧐
A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
Action: build
Failed stage: Test [❌]
Failure summary:
Bazel failed during analysis because the
opamtoolchain setup (module extension@@tools_opam+//extensions:opam.bzl%opam) could not create the OCaml switch4.14.2. The root cause isa sandboxing/network namespace error while compiling
ocaml-base-compiler:- At
/home/runner/.bazel/external/tools_opam+/extensions/opam/opam_toolchain_xdg.bzl:242:17, the buildcalls
fail(...)afteropam switch createexits with rc=31.-
stderrfrom opam shows the configurestep failed with:
bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted(lines 1945-1947).-
This indicates bubblewrap (used by opam sandbox) attempted to configure a loopback address in the
container/runner and was denied due to permissions.
- Because the opam extension failed, many
targets could not be analyzed, leading to Bazel reporting "command succeeded, but not all targets
were analyzed" and ultimately "No test targets were found, yet testing was requested."
Relevant error logs: