Skip to content

fix: handle compact JSON in checkLatestRelease()#8911

Open
avasis-ai wants to merge 1 commit intomakeplane:masterfrom
avasis-ai:fix/checklatestrelease-v2
Open

fix: handle compact JSON in checkLatestRelease()#8911
avasis-ai wants to merge 1 commit intomakeplane:masterfrom
avasis-ai:fix/checklatestrelease-v2

Conversation

@avasis-ai
Copy link
Copy Markdown

Summary

Fixes #8775

The checkLatestRelease() function uses grep to extract tag_name from the GitHub API response. The current pattern '"tag_name": "[^"]*"' assumes a space after the colon, but the GitHub API sometimes returns compact JSON without spaces ("tag_name":"v1.2.3"), causing the grep to match nothing and the script to exit with an error.

Changes

  • Made the space after the colon optional in both grep and sed patterns using [ ]* (zero or more spaces)
  • Applied the fix to both deployments/cli/community/install.sh and deployments/swarm/community/swarm.sh

Test plan

  1. Run ./setup.sh and select Option 5 (Upgrade)
  2. Verify the script correctly parses the latest release tag regardless of JSON formatting

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b95403a2-88f4-4d6f-9574-04af5d5969bc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kenarsuleyman
Copy link
Copy Markdown

Can we merge this? I'm pretty sure many users can't upgrade their Plane because of this and possibly break something else while trying to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants