Skip to content

Fix version command to work without a profile - #124

Open
pratik50 wants to merge 2 commits into
parseablehq:mainfrom
pratik50:pbVersionFix
Open

pratik50 wants to merge 2 commits into
parseablehq:mainfrom
pratik50:pbVersionFix

Conversation

@pratik50

@pratik50 pratik50 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #121 and #122

  • Make pb version and pb -v work with and without profile.
  • Show the local version only; JSON output contains just the version field.
  • Point users to pb status for server details.
  • Align the PromQL agent catalog with the README’s --dataset syntax.

Summary by CodeRabbit

  • Updates
    • pb version reports the client version only and works without an active profile or server connection.
    • Text output uses the format pb version <version>, with a leading v removed from the version.
    • JSON output contains only the normalized client version.
    • Use pb status for server and connection details.
    • Command descriptions now clarify the distinction between client version information and server status.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 4e6a7e38-b635-475b-8daa-cdae11f2e4d2

📥 Commits

Reviewing files that changed from the base of the PR and between 13f7fb8 and be32804.

📒 Files selected for processing (1)
  • cmd/agent.go

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The pb version command reports the local client version in text or JSON. It does not require a configured profile or contact the server. Documentation and command metadata direct users to pb status for server and connection details.

Changes

Client version and command catalog

Layer / File(s) Summary
Client version behavior
cmd/version.go, cmd/agent.go, README.md, cmd/version_test.go
pb version trims a leading v and outputs only the client version. JSON contains only the normalized version field. The command works without a usable profile. Documentation and metadata direct users to pb status for server and connection details. Tests cover text and JSON output with configured and missing profiles.
PromQL dataset arguments
cmd/agent.go
The PromQL labels, label-values, and series catalog entries use --dataset; the series entry lists --match before that flag.

Priority: ⬇️ Low

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to be328

The reviewed command descriptions are consistent with the available command-parsing evidence; no issue identified here blocks merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes support issue #121, including version documentation, the version catalog entry, and version tests. However, cmd/agent.go also changes unrelated PromQL catalog entries for labels, `lab… Remove the unrelated PromQL catalog changes from this pull request, or link them to a directly applicable coding requirement.
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR #124 implements the coding requirements from directly linked issue #121. cmd/version.go makes PrintVersion local-only and removes profile loading and server access. The root --version path ca…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: making the version command work without a configured profile.
Full details: Out of Scope Changes check

Explanation

Most changes support issue #121, including version documentation, the version catalog entry, and version tests. However, cmd/agent.go also changes unrelated PromQL catalog entries for labels, label-values, and series, including dataset selection and argument ordering. The linked issue and PR objective do not require these catalog changes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

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.

pb --version fails when no profile is configured

1 participant