finch icon indicating copy to clipboard operation
finch copied to clipboard

Print `nerdctl version` in `finch version`

Open AkihiroSuda opened this issue 2 years ago • 6 comments

What is the problem you're trying to solve?.

The nerdctl version information is not printed in finch version

$ finch version
Finch version: v0.1.0

Describe the feature you'd like I'd expect finch version to work like this (same as nerdctl version except the first three lines)

$ finch version
Finch:
 Version: v0.1.0
  
Client:
 Version:	v1.0.0
 OS/Arch:	linux/amd64
 Git commit:	c00780a1f5b905b09812722459c54936c9e070e6
 buildctl:
  Version:	v0.10.5
  GitCommit:	bc26045116045516ff2427201abd299043eaf8f7

Server:
 containerd:
  Version:	v1.6.8
  GitCommit:	9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:	1.1.4
  GitCommit:	v1.1.4-0-g5fd4c4d1

Additional context

AkihiroSuda avatar Nov 22 '22 19:11 AkihiroSuda

How about this?

$ finch version
Client:
 Version:	v0.1.0
 OS/Arch:	linux/amd64
 Git commit:	c00780a1f5b905b09812722459c54936c9e070e6
 nerdctl: 
   Version: v1.0.0
   GitCommit: <commit>
 buildctl:
  Version:	v0.10.5
  GitCommit:	bc26045116045516ff2427201abd299043eaf8f7

Server:
 containerd:
  Version:	v1.6.8
  GitCommit:	9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:	1.1.4
  GitCommit:	v1.1.4-0-g5fd4c4d1

I feel adding a separated Finch version block makes the output format of "finch version" too special. From Finch users' perspective, Finch itself is the client itself so Finch version is just the client version. Nerdctl can be added as part of Client dependency.

ningziwen avatar Dec 12 '22 20:12 ningziwen

should we also add lima version in the Client ?

ahsan-z-khan avatar Dec 12 '22 20:12 ahsan-z-khan

I don't see a strong reason adding virtualization layer dependency version, and not adding virtualization layer seems to make the version output easier to be consistent across all the platforms. Maybe we can exclude virtualization layer dependency version for now. We can add it later if people come up with a good justification.

ningziwen avatar Dec 13 '22 19:12 ningziwen

Yeah, I think the nerdctl/buildkit/containerd/runc version is useful to our users because there are user-facing features that might be added in a new version of each of those. I’d argue that Lima features aren’t really user-facing for users of Finch because the Finch VM is mostly transparent.

sam-berning avatar Dec 14 '22 18:12 sam-berning

What are cons of displaying lima version? It might be helpful in some scenarios , for example, issue investigation or any unsupported scenarios. Can't we just call the lima cmd and display the version?

ChandruShetty avatar Dec 14 '22 22:12 ChandruShetty

I agree that it's no big deal to add the Lima version on its own. But following that line of reasoning, why shouldn't we also add the QEMU version, the Fedora version, etc?

In my opinion, it'd be better to keep the output of this command shorter to make it easier to parse at a glance. In order to do that, we'd need to draw the line somewhere, and I think this line makes the most sense.

It might be helpful in some scenarios , for example, issue investigation or any unsupported scenarios.

I believe the Lima version should map 1:1 with a Finch version, so we should be able to determine the Lima version from the Finch version when we're investigating.

sam-berning avatar Dec 14 '22 22:12 sam-berning