Skip to content

Implement a kapow version subcommand #99

@nilp0inter

Description

@nilp0inter

We need to know which kapow version is running on the client as well as in the server side.

Taking inspiration from Blatanly copying the docker version subcommand:

$ docker version
Client:
 Version:           19.03.5-ce
 API version:       1.40
 Go version:        go1.13.4
 Git commit:        633a0ea838
 Built:             Fri Nov 15 03:19:09 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.5-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.4
  Git commit:       633a0ea838
  Built:            Fri Nov 15 03:17:51 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.2.m
  GitCommit:        d50db0a42053864a270f648048f9a8b4f24eced3.m
 runc:
  Version:          1.0.0-rc9
  GitCommit:        d736ef14f0288d6993a1845745d6756cfc9ddd5a
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Several thing are needed to have this information:

  • Embed git describe output at compilation time. This way we can match the output with the documentation. I've found this
  • Extract information about how the binary was compiled. I don't know if Go already provide this at runtime, but if not we can use the method mentioned earlier.
  • Expose this information via the Control API and/or Data API. This point has to be discussed.
  • Embed the version of the Go compiler used and expose it as well (suggested by @hhurtado & @panchoh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionthings to discuss aboutenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions