snap commands need a machine readable output format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Expired
|
Medium
|
Unassigned |
Bug Description
for a good while, I've been using snaps with juju charms. One of the pain points has been the lack of machine readable output for information being emitted from commands like:
snap list
snap info
Instead of getting json/yaml everything appears to be centered around human interaction with smart output formatting. Which is great until a change happens when you're attempting to capture smart output and parse it.
Take the example of the etcd snap version parser which broke this morning:
https:/
We knew walking into this that there was a good chance our scraping would break if the output changed at all using things like spaces to split output. Our fear was realized.
This can be easily mitigated by providing machine friendly output formats. I would prefer JSON as it's a more dense, and flexible format than YAML, but either would suffice for situations where we're driving snapd and need to surface information from the system.
summary: |
- snap info needs a machine readable output format + snap commands need a machine readable output format |
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
I'd like to see machine readable output as well. We're building automation that needs to do validation around snap versions and I'm concerned the output of `snap list` will change in unpredictable ways.