Beautify release-info; add markdown option; remove yaml/json options#407
Beautify release-info; add markdown option; remove yaml/json options#407
Conversation
The release-info command is for users who want to quickly understand what's in a manifest file without having to go through the pain of reading a YAML file. As such, they shouldn't need json/yaml outputs, so removed them. One can always open the manifest file and "read" the yaml if they want to. Markdown support makes it more accessible to be viewed even in a browser, e.g., open file.md in a browser: elemental3 release-info -m file.yaml > file.md
dharmit
left a comment
There was a problem hiding this comment.
Couple of questions for the reviewer.
| out := cmd.Writer | ||
| if out == nil { | ||
| out = cmd.Root().Writer | ||
| } |
There was a problem hiding this comment.
This was done with AI's help. It helped get rid of GetOutput I added to the Logger interface the previous time.
PTAL if it makes sense or needs change.
| if out == nil { | ||
| out = cmd.Root().Writer | ||
| } | ||
| return printManifest(resolved, uri, out) |
There was a problem hiding this comment.
The out argument is passed around in a bunch of print* functions. If var markdown bool done at the top of this file makes sense, I can use the same pattern for out too. Is that worth it?
atanasdinov
left a comment
There was a problem hiding this comment.
This looks great! I'm only sceptic of the Product side column indication; it feels off. Perhaps we can have the "*" symbol right next to the component names and drop the column unless anything better comes to mind?
b84b510 to
9cf696c
Compare
Just a |
atanasdinov
left a comment
There was a problem hiding this comment.
Please rebase before hitting the merge button once we get a second approval. Thanks!
The release-info command is for users who want to quickly understand
what's in a manifest file without having to go through the pain of
reading a YAML file. As such, they shouldn't need json/yaml outputs, so
removed them. One can always open the manifest file and "read" the yaml
if they want to.
Markdown support makes it more accessible to be viewed even in a
browser, e.g., open file.md in a browser:
$ elemental3 release-info -m file.yaml > file.mdExamples
Core manifest file
manifest.yaml
elemental3 release-info --local manifest.yaml
$ sudo ./build/elemental3 release-info --local ~/release_manifest_2.yaml ┌──────────────┬──────────────────────────────────────────────┐ │ ATTRIBUTE │ CORE PLATFORM ( BASE ) │ ├──────────────┼──────────────────────────────────────────────┤ │ Name │ suse-core-test │ │ Version │ 0.6-rc.20260317 │ │ Release Data │ 2026-03-17 │ │ Source │ file:///home/dharmit/release_manifest_2.yaml │ └──────────────┴──────────────────────────────────────────────┘ ┌───────────────────────────┬────────────────┬────────────────────────────────────────────────────────────────┐ │ INFRASTRUCTURE COMPONENTS │ VERSION │ SOURCE │ ├───────────────────────────┼────────────────┼────────────────────────────────────────────────────────────────┤ │ Operating System │ SLES 16.0 │ registry.suse.com/beta/uc/uc-base-os-kernel-default:16.0-55.79 │ │ Kubernetes │ v1.35.0+rke2r1 │ registry.suse.com/beta/uc/rke2:1.35_1.42-1.77 │ └───────────────────────────┴────────────────┴────────────────────────────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────────────────────┐ │ SYSTEMD EXTENSIONS │ IMAGE REFERENCE │ ├────────────────────┼────────────────────────────────────────────────────────┤ │ elemental3ctl │ registry.suse.com/beta/uc/elemental3ctl:0.6_19.2-3.151 │ └────────────────────┴────────────────────────────────────────────────────────┘ ┌──────────────────────────┬─────────┬────────────────────────────────────┬──────────────────────────┬────────────┐ │ CHART NAME │ VERSION │ REPOSITORY │ TARGET NAMESPACE │ DEPENDS ON │ ├──────────────────────────┼─────────┼────────────────────────────────────┼──────────────────────────┼────────────┤ │ metallb │ 0.15.2 │ https://metallb.github.io/metallb │ metallb-system │ - │ │ endpoint-copier-operator │ 0.3.0 │ https://suse-edge.github.io/charts │ endpoint-copier-operator │ - │ └──────────────────────────┴─────────┴────────────────────────────────────┴──────────────────────────┴────────────┘Markdown output
Product Manifest file
manifest.yaml
elemental3 release-info --local manifest.yaml
Markdown output