Skip to content

fix(cli): emit one JSON object per ref in list-refs - #4169

Merged
Fokko merged 1 commit into
apache:mainfrom
aayusbhat26:fix/json-list-refs
Oct 28, 2026
Merged

Fokko merged 1 commit into
apache:mainfrom
aayusbhat26:fix/json-list-refs

Conversation

@aayusbhat26

@aayusbhat26 aayusbhat26 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4098.

The JSON output for list-refs built one object per retention property, so a single snapshot ref produced multiple objects. Build one object per ref and merge its properties into it.

Tests: added a regression test in tests/cli/test_output.py. pytest tests/cli passes (102 tests); ruff check and ruff format --check pass.

The nested comprehension emitted one object per retention property, so a single snapshot ref produced several JSON objects. Build one object per ref and merge its properties into it.
Copilot AI balanced review requested due to automatic review settings October 28, 2026 08:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this @aayusbhat26

@Fokko
Fokko enabled auto-merge October 28, 2026 08:26
@Fokko
Fokko added this pull request to the merge queue Oct 28, 2026
Merged via the queue into apache:main with commit 4ba3ba4 Oct 28, 2026
21 checks passed
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.

CLI: --output=json list-refs emits one object per retention property instead of per ref

3 participants