Skip to content

limactl list produces different data for json vs. yaml output #3984

@jandubois

Description

@jandubois

I'm working on adding some integration tests and found that the limactl list command outputs different structures for json vs. yaml format:

All of the "host" setting use different names:

l ls default --format json | yq .HostOS
darwinl ls default --format yaml | yq .hostos
darwin

Same for HostArch, LimaHome, and IdentityFile. Arguably these settings belong in the limactl info output because they are not specific to the instance.

In the YAML output all the instance specific settings are inside an instance object, but in the JSON they are merged together with the host settings.

l ls default --format json | yq .name
defaultl ls default --format yaml | yq .instance.name
default

Returning different schemas for different formats is insanity, but I have no idea how to fix it while preserving backwards compatibility. If we do break compatibility, then we should probably do this in the 2.0 release, so I'll mark this as a high priority issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions