-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Enhance the output of consul snapshot inspect #8787
Conversation
…n be decoded into a struct. (valueType: 2)\n
…consul_snappyshot
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.
This is looking good. Great to see it's being released soon!
Added some mostly stylistic suggestions.
} | ||
stats, offset, err := enhance(file) | ||
if err != nil { | ||
c.UI.Error(fmt.Sprintf("Error verifying snapshot: %s", err)) |
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.
This error message could be updated, it's from the old call to snapshot.Verify()
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
command/snapshot/inspect/testdata/TestSnapshotInspectEnhanceCommand.golden
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
230168b
to
a68c72c
Compare
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
…consul_snappyshot
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.
Just the one change necessary to the changelog entry but otherwise 👍
.changelog/8787.txt
Outdated
@@ -0,0 +1,3 @@ | |||
```release-note:feature | |||
agent: update `consul snapshot inspect` command to provide more detailed snapshot data |
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.
agent: update `consul snapshot inspect` command to provide more detailed snapshot data | |
snapshot: update `consul snapshot inspect` command to provide more detailed snapshot data |
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.
a few minor things, but I think the defer to remove the temp file would be good to handle
Adding @banks Consul Snapshot tool which enhances the output of the
consul snapshot inspect
command to look something like this:On the downside, each time a new type is added it will need to be added in two places as RB as shown below.