Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human-readable bootc status #602

Closed

Conversation

lukewarmtemp
Copy link
Contributor

Fixes #408

@cgwalters
Copy link
Collaborator

Thanks for working on this! I need to pull your PR and try it but just at a quick look, it's just a shorter YAML serialization right?

I had been thinking we'd output something more like rpm-ostree status that is explicitly not parsable by machines, just intended solely for human visual consumption. Other prior art is e.g. systemctl status which is partially structured but also uses ASCII art drawing characters, etc.

Before we try to write too much more code I think it'd be good to have a bike shed (maybe in the original issue) with some proposed example outputs that different people would like to see from this. Does that makes sense?

@@ -116,6 +116,11 @@ pub(crate) struct StatusOpts {
/// Only display status for the booted deployment.
#[clap(long)]
pub(crate) booted: bool,

/// Condense status into most important info, to reduce eye fatigue
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can probably just go ahead and default to human-readable if we're writing to a tty by default.

That avoids the need to call it anything at all, and avoids "typing fatigue" from a potentially frequently used CLI option.

Arguably then, we could also simultaneously switch to JSON by default if we're not on a tty.

But, we probably do need a general option here like:

enum OutputFormat {
  HumanReadable,
  YAML,
  JSON
}

or so and

pub(crate) format Option<OutputFormat>

or so.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jmarrero
Copy link
Member

closing in favor of #738

cgwalters added a commit to cgwalters/bootc that referenced this pull request Nov 6, 2024
store: If ostree >= 2024.3, retain content in `/var`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a human readable output for bootc status
3 participants