initial #2265
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!2265
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2265/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: #1691
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1691
Original created: 2025-10-04T01:37:35Z
Original updated: 2025-10-04T03:12:07Z
Original head: carverauto/serviceradar:1690-chorebazel-create-github-release
Original base: main
Original merged: 2025-10-04T03:09:25Z by @mfreeman451
PR Type
Enhancement
Description
Add GitHub release publishing automation for ServiceRadar packages
Implement Bazel-based release pipeline with container and artifact publishing
Create comprehensive release documentation and workflow integration
Add version validation and dry-run capabilities
Diagram Walkthrough
File Walkthrough
publish_packages.go
Core GitHub release publishing toolrelease/publish_packages.go
release_pipeline.sh
BuildBuddy release automation pipelinetools/buildbuddy/release_pipeline.sh
release_targets.bzl
Bazel packaging targets for releasespackaging/release_targets.bzl
VERSION
Version bump to pre-releaseVERSION
RELEASE_PUBLISHING.md
Comprehensive release publishing documentationdocs/RELEASE_PUBLISHING.md
BUILD.bazel
Bazel build configuration for publisherrelease/BUILD.bazel
BUILD.bazel
BuildBuddy tool build configurationtools/buildbuddy/BUILD.bazel
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1691#issuecomment-3367744646
Original created: 2025-10-04T01:38:47Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Dry-run bypass risk
Description: GitHub API HTTP client returns a fabricated 200 OK response with empty JSON body during
dry-run, which could mask real server-side validation or permission issues if mistakenly
enabled in production; ensure dry-run cannot be enabled unintentionally in automated
environments.
publish_packages.go [263-295]
Referred Code
Missing integrity checks
Description: Asset upload omits checksum verification or content hashing, making it harder to detect
tampering or corruption of artifacts during transit or from disk; consider computing and
uploading checksums or verifying sizes post-upload.
publish_packages.go [383-439]
Referred Code
Unsafe tag fallback
Description: Tag derivation falls back to environment variables and defaults (e.g., sha-dev) which, if
misconfigured, could cause publishing under unintended tags; add stricter validation in
non-dry-run mode to prevent accidental releases.
release_pipeline.sh [21-44]
Referred Code
🎫 #1690
package artifacts.
container pushes work with real credentials.
deployment environment.
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/1691#issuecomment-3367745277
Original created: 2025-10-04T01:39:55Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Consider using the official GitHub CLI
Replace the custom 600-line Go program for GitHub API interaction with the
official GitHub CLI (
gh). This would reduce maintenance by leveraging astandard, robust tool for release creation and asset uploads.
Examples:
release/publish_packages.go [1-618]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: This is an excellent architectural suggestion that correctly identifies the custom Go program (
publish_packages.go) reinvents functionality provided by the standard GitHub CLI (gh), and replacing it would significantly reduce code complexity and long-term maintenance.✅
Handle potential error when reading responseSuggestion Impact:
The commit modified the error handling path after non-2xx responses: it still reads the body without checking the read error, but it changed the returned error to wrap a sentinel error (errGithubAPI). Although it did not implement the exact suggested check for io.ReadAll's error, it altered the same code block and adjusted error reporting, indicating the suggestion influenced the change.code diff:
Handle the potential error returned by
io.ReadAllwhen reading an API errorresponse body to ensure error messages are complete and accurate.
release/publish_packages.go [289-293]
[Suggestion processed]Suggestion importance[1-10]: 7
__
Why: The suggestion correctly points out that an error from
io.ReadAllis ignored, which could result in losing important diagnostic information. Handling this error makes the error reporting more robust.Remove redundant error handling logic
Remove the redundant
errors.Ascheck in the error handling block, as it returnsthe original error regardless of the outcome, simplifying the code.
release/publish_packages.go [300-306]
Suggestion importance[1-10]: 4
__
Why: The suggestion correctly identifies a redundant block of error-checking code that has no effect on the program's logic. Removing it improves code clarity and simplicity.
Remove duplicate code block
Remove the duplicate code block that checks and resets the
PUSH_ARGSarray, asthis action is already performed earlier in the script.
tools/buildbuddy/release_pipeline.sh [104-106]
Suggestion importance[1-10]: 4
__
Why: The suggestion correctly identifies a duplicated block of code that resets the
PUSH_ARGSarray. Removing the redundant block simplifies the script and improves maintainability.Use case-sensitive commit SHA comparison
Replace the case-insensitive commit SHA comparison using
strings.EqualFoldwitha standard case-sensitive comparison (
!=) for improved correctness.release/publish_packages.go [224-226]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that using a case-insensitive comparison for commit SHAs is not best practice. Switching to a case-sensitive comparison with
!=improves the code's robustness and correctness.