Until now, the local/disposable decision was made based on task formula. If it
contained ['environment']['machine'], remote run was selected. This is now moved
to config using key runtask_mode with two available options local and libvirt.
Default is local for development profile and libvirt for production profile.
Details
- Reviewers
kparal mkrizek jskladan - Maniphest Tasks
- T408: refine formula syntax from PoC
- Commits
- rLTRN58445161db51: Local/disposable decision moved to config
py.test and manual
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
| libtaskotron/runner.py | ||
|---|---|---|
| 62–81 | Although the intentions here are obvious, wouldn't it be better to just make --local and --ssh mutually exclusive in the process_args() too? | |
| 81–82 | This might be a good candidate for moving into config in this diff as well? Also, it IMHO would make more sense to have these set before the if 'ssh'... clause - you could easily get rid of lines where you hard-set the 'sane defaults' anyway, and would remove the dichotomy of handling the self.privkey - None when --ssh is set, but ssh_privkey is not, and 'conf_id_taskotron' as "default" when --ssh is not used. | |
Apart of the nitpicks in comments, LGTM.
| conf/taskotron.yaml.example | ||
|---|---|---|
| 43 | I'm not sure that localhost is the best default, but don't have any better option at hand, so, whatevs, I guess :) | |
| libtaskotron/runner.py | ||
| 78–79 | see #TODO | |
| 266 | This looks like a leftover from testing. Either remove the line, or change it to log statement. | |
I'm not sure that localhost is the best default, but don't have any better option at hand, so, whatevs, I guess :)