fix: tag_name grep fails to match compact JSON from GitHub API - #9555
fix: tag_name grep fails to match compact JSON from GitHub API#9555BGameiro2000 wants to merge 1 commit into
Conversation
GitHub's API returns compact JSON with no space after the colon
("tag_name":"v1.4.0"), but the grep pattern requires one
("tag_name": "). This silently empties $latest_release, which
then fails architecture image lookups with an invalid reference
instead of actually stopping at the intended exit 1.
📝 WalkthroughWalkthroughThe community installer now accepts optional whitespace after the JSON colon when extracting the GitHub release ChangesRelease tag parsing
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
deployments/cli/community/install.sh (1)
60-60: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winHandle lookup failures separately from
local.
local latest_release=$(...)masks the command-substitution status. The pipeline can also hidecurlfailures becauseseddetermines the pipeline status by default. Declarelatest_releaseseparately, capture the response withcurl -fsSL, and then parse it. This preserves the intended fail-closed behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@deployments/cli/community/install.sh` at line 60, Update the latest release lookup by declaring latest_release separately from its assignment, fetching the GitHub response with curl -fsSL, and parsing the captured response afterward. Ensure curl failures are detected before parsing so the installation retains its fail-closed behavior, rather than relying on the pipeline status or local assignment.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@deployments/cli/community/install.sh`:
- Line 60: Update the latest release lookup by declaring latest_release
separately from its assignment, fetching the GitHub response with curl -fsSL,
and parsing the captured response afterward. Ensure curl failures are detected
before parsing so the installation retains its fail-closed behavior, rather than
relying on the pipeline status or local assignment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 021bacf4-39bf-4915-9e13-0d745e367540
📒 Files selected for processing (1)
deployments/cli/community/install.sh
GitHub's API returns compact JSON with no space after the colon ("tag_name":"v1.4.0"), but the grep pattern requires one ("tag_name": "). This silently empties $latest_release, which then fails architecture image lookups with an invalid reference instead of actually stopping at the intended exit 1.
Type of Change
Summary by CodeRabbit