-
Notifications
You must be signed in to change notification settings - Fork 40
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
[sled-diagnostics] Output for support bundles should be structured #7228
base: spr/papertigers/main.sled-diagnostics-output-for-support-bundles-should-be-structured
Are you sure you want to change the base?
Conversation
Created using spr 1.3.6-beta.1
Deployed this on my bench gimlet to ensure things looked sane:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional layer of structure here makes sense to me!
sled-diagnostics/src/queries.rs
Outdated
#[serde(rename_all = "snake_case")] | ||
pub enum SledDiagnosticsQueryOutput { | ||
Success { | ||
/// The command and it's arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The command and it's arguments. | |
/// The command and its arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7b67092
sled-diagnostics/src/queries.rs
Outdated
/// The exit status of the command. This will be the exit code (if any) | ||
/// and exit reason such as from a signal. | ||
exit_status: String, | ||
/// The exit code if one was present when the comman exited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The exit code if one was present when the comman exited. | |
/// The exit code if one was present when the command exited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7b67092
/// Any stdout/stderr produced by the command. | ||
stdio: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're now returning structured output, would it make sense to start separating stderr and stdout? or is it more useful to keep interleaving them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think it's more useful to have them interleaved but I am open to changing it if others think it's better.
My reasoning is being able to see where an error occurred in a command's output vs just that an error occurred at some point.
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
This introduces the
SledDiagnosticsQueryOutput
type so support bundles can now have structured output in collected files. This makes it potentially easier for an operator to write scripts that search for particular commands based on various fields.This is on top of: