Open janosh opened 1 month ago
Hi @janosh,
this seems indeed a good information to have, in order to clear the doubts about the status of the runner.
Allowing to fetch information directly from the runner process could be feasible, but impractical. And probably not worth for this kind of information, that remains fixed theoughout the execution of the runner. I would propose that the DaemonManager
also dumps/copies a version of the current configuration file in the ~/.jfremote/$PROJECT_NAME/daemon
folder when the runner is started. Implementing the options that you suggest would then boil down to just read that file. Printing, determining if stale and print the diff will be straightforward.
What do you think?
Printing, determining if stale and print the diff will be straightforward. What do you think?
sounds like a good way to go about this! i'm hoping Radical can submit a PR for that though #124 should probably get priority
Somehow kind of related to #150 I would say. In principle, only one runner should be started for a given db, but currently nothing prevents from having two places (servers) in which a runner is started. Maybe jf runner info / show-config could also provide some information about a potential runner running elsewhere (taken from auxiliary collection). Regarding jf runner show-config, maybe it would be logical to have a verbose (-v or -vv or -vvv) to jf runner info, similar to jf job info for example. -v could be to show the config, while -vvv to show the config + difference.
Thanks for proposing to submit this PR @janosh when you have time (and/or the one about #124).
related to https://github.com/Matgenix/jobflow-remote/issues/155
for a runner who's been up for weeks and whose config file may have undergone multiple changes in that time, it would be great to be able to verify exactly which version of the config the runner is currently using. could we add a print config option like
jf runner info --config
orjf runner show-config
there could also be, say, a
jf runner info --stale-config
option that just printsup-to-date
orstale
when therunner
is out of date with its config file. alternatively, that could also be made part of thejf runner info
outputfinally, maybe a
jf runner show-config --diff
option would be useful that uses Python'sdifflib
to highlight which lines changed in the current runner's config vs its config file