-
Notifications
You must be signed in to change notification settings - Fork 9
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
cli: switch back to human readable version information #776
Conversation
This PR depends on #772. The PR seemingly breaks CI, so I've manually cancelled the CI jobs for this PR. I'll restart them once the underlying issue is fixed. |
Needs to wait for #775 too, I'm afraid |
6e40ff8
to
80685d3
Compare
aaef24e
to
131e659
Compare
80685d3
to
81b98be
Compare
I think this needs a rebase |
131e659
to
3f7740c
Compare
cli/main.go
Outdated
case platforms.AKSCloudHypervisorSNP: | ||
fmt.Fprintf(versionsWriter, "\tlaunch digest:\t%s\n", embeddedReferenceValues.AKS.TrustedMeasurement.String()) | ||
fmt.Fprint(versionsWriter, "\tdefault SNP TCB:\t\n") | ||
fmt.Fprintf(versionsWriter, "\t bootloader:\t%d\n", embeddedReferenceValues.AKS.SNP.MinimumTCB.BootloaderVersion.UInt8()) |
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.
fmt.Fprintf(versionsWriter, "\t bootloader:\t%d\n", embeddedReferenceValues.AKS.SNP.MinimumTCB.BootloaderVersion.UInt8()) | |
fmt.Fprintf(versionsWriter, "\t\tbootloader:\t%d\n", embeddedReferenceValues.AKS.SNP.MinimumTCB.BootloaderVersion.UInt8()) |
nit
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.
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.
Hm.. This seems like it's intended? (for aligning everything)
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.
Instead of handcrafting this output, can we maybe switch to a structured format that has opinionated rendering but decent readability, e.g. YAML or TOML?
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.
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.
Fine for me, if it contains the needed info.
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.
Yeah, tabwriter is doing what's it's supposed to to, but the behavior just doesn't fit our use-case.
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.
Fine for me, if it contains the needed info.
The embedded reference values don't contain the genpolicy version.
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.
@burgerdev @katexochen are you fine with hand-crafting the ouput for now? Maybe once we only use a single genpolicy version, we can just print the reference values verbatim.
2cc8939
to
0eb46f1
Compare
needs another rebase, sorry. Changes LGTM though. |
3f7740c
to
89f300b
Compare
344c43a
to
e1ce818
Compare
e1ce818
to
b6cb256
Compare
This PR changes the JSON dump back into a human readable version dump :)