t5399: Remove jq -r flag for clearer null output in cloudron docs#5416
t5399: Remove jq -r flag for clearer null output in cloudron docs#5416alex-solovyev wants to merge 1 commit intomainfrom
Conversation
Drop the -r (raw-output) flag from jq version queries so that a missing .version key returns the string 'null' instead of empty output, giving users unambiguous feedback during interactive troubleshooting. Addresses review feedback from PR #5338 (gemini-code-assist).
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Mar 21 18:38:16 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the clarity of error messages in the Cloudron documentation by removing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request aims to improve the clarity of jq command outputs in the Cloudron documentation by removing the -r flag, so that a missing version key results in a null string instead of an empty one. While this is a good step, it has the side effect of wrapping existing version strings in quotes. I've suggested using jq's fallback operator (//) to provide the intended null output for missing keys while preserving the raw, unquoted output for existing version strings, which offers a better user experience.
|
|
||
| # Get the current Cloudron version | ||
| jq -r '.version' /home/yellowtent/box/package.json | ||
| jq '.version' /home/yellowtent/box/package.json |
There was a problem hiding this comment.
While removing -r makes the output null for a missing key, it also wraps an existing version string in quotes (e.g., "7.5.0"), which can be inconvenient. A better approach is to use jq's fallback operator //. This will output the raw version string if it exists and the literal string null if it doesn't, achieving the goal of clarity without the undesirable side effect.
| jq '.version' /home/yellowtent/box/package.json | |
| jq -r '.version // null' /home/yellowtent/box/package.json |
References
- In
jq, use the fallback operator//to provide a default value for expressions that might result innull, such asmin_byormax_byon empty or invalid inputs.
| | System journal (previous boot) | `journalctl -b -1 --no-pager -n 50 -p warning` | What happened before the reboot | | ||
| | Cloudron troubleshoot | `cloudron-support --troubleshoot` | Built-in diagnostic checks (DNS, certs, services, migrations) | | ||
| | Cloudron version | `jq -r '.version' /home/yellowtent/box/package.json` | Current Cloudron version | | ||
| | Cloudron version | `jq '.version' /home/yellowtent/box/package.json` | Current Cloudron version | |
There was a problem hiding this comment.
For consistency and better user experience, this command should also use the // fallback operator. This change ensures that the raw version string is displayed when available and null when not, avoiding the quotes that would be introduced by simply removing the -r flag.
| | Cloudron version | `jq '.version' /home/yellowtent/box/package.json` | Current Cloudron version | | |
| | Cloudron version | `jq -r '.version // null' /home/yellowtent/box/package.json` | Current Cloudron version | |
References
- In
jq, use the fallback operator//to provide a default value for expressions that might result innull, such asmin_byormax_byon empty or invalid inputs.
|
Duplicate of #5413 — closing in favour of the earlier PR. |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Mar 24 09:07:20 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
|
Closing: merge conflicts with main after reopening. The changes need to be rebased or re-implemented in a fresh branch. |



Summary
-r(raw-output) flag from twojqversion-query commands in.agents/services/hosting/cloudron.md-r, a missing.versionkey outputs the stringnullinstead of empty output, giving users unambiguous feedback during interactive troubleshootingReview Feedback Addressed
Both findings from PR #5338 (gemini-code-assist):
jq -r '.version'→jq '.version'(code block)jq -r '.version'→jq '.version'(reference table)Closes #5399