Skip to content

Conversation

cgwalters
Copy link
Member

This is way long overdue, and will be useful for a variety of things
but is especially motivated by soft reboot testing.

Signed-off-by: Colin Walters walters@verbum.org

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a new --json output option for the status command, which is a valuable addition for programmatic consumption of deployment information. This is achieved by integrating a new ul-jsonwrt utility library for JSON formatting. The changes are well-structured, with a dedicated JSON writing function and corresponding test cases. However, there are a couple of areas in the newly added JSON utility library that could lead to unexpected behavior or potential issues.

@cgwalters cgwalters force-pushed the emit-json branch 2 times, most recently from 5e30a01 to 68a4443 Compare June 26, 2025 14:27
We've had a longstanding need to emit JSON to be friendlier
to shell scripting tools.

I hesitated for (way too long) on which JSON libraries to
use, but actually since we don't need to *parse* JSON,
we only need to omit it, the problem domain is super
simple.

util-linux has simple code for this
util-linux/util-linux@b649ff9

So this commit imports it, but it will need a little massaging
to build.

Signed-off-by: Colin Walters <walters@verbum.org>
This gets the code to build without the rest of util-linux.

Signed-off-by: Colin Walters <walters@verbum.org>
This is way long overdue, and will be useful for a variety of things
but is especially motivated by soft reboot testing.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@cgwalters cgwalters merged commit 56c05ec into ostreedev:main Jun 26, 2025
25 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.

2 participants