Add Version Command#246
Conversation
|
Might make more sense if this outputs the version on every machine in the cluster actually |
There is a function You just pass that as the context to However, if I remember correctly, the returned metadata on each response just has the machine's IP address, not the name. So most of the code using it also has some code that maps the IP on each to the user's name for the machine to make the command output more friendly. (Aside, that recurring pattern of mapping the machine metadata to the user-friendly machine name is probably something we should refactor to de-duplicate across commands. Definitely a task for a separate MR, imo, though.) Here's another example of usage in And then the code for the lookup as I loop through each machine's result payload: Note also the special handling of update: a quick first pass at the refactored ProxyMachinesContext idea here: #247 |
44efdec to
ec27398
Compare
|
Outputs this now. Decided to put it on the MachineInfo instead. |
Ah, yeah, that's a good idea. Makes sense for the machine info to include (and near zero overhead), as I imagine it could be useful for other purposes. For example, I think there was a discussion in discord about how the cli should output a smarter error if the issue is the daemon needing an upgrade, etc. |
|
Superseded by 8b95db6, 8aa0a96, and ad43569 that make each machine the source of truth for its |
It's not straightforward to check what version of the daemon is running on a machine. This adds a
uc versioncommand that displays both the client and server versions.