Local/disposable decision moved to config
ClosedPublic

Authored by lbrabec on Jul 24 2015, 11:40 AM.

Details

Summary

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.

Test Plan

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.
lbrabec retitled this revision from to Local/disposable decision moved to config.Jul 24 2015, 11:40 AM
lbrabec updated this object.
lbrabec edited the test plan for this revision. (Show Details)
lbrabec added reviewers: kparal, mkrizek, jskladan.
lbrabec updated this revision to Diff 1251.Jul 25 2015, 6:48 AM
  • typo fix
jskladan requested changes to this revision.Jul 27 2015, 1:13 PM
jskladan added inline comments.
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.

This revision now requires changes to proceed.Jul 27 2015, 1:13 PM
lbrabec updated this revision to Diff 1256.Jul 28 2015, 11:05 AM
  • code polishing
jskladan accepted this revision.Jul 28 2015, 11:29 AM

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.

This revision is now accepted and ready to land.Jul 28 2015, 11:29 AM
Closed by commit rLTRN58445161db51: Local/disposable decision moved to config (authored by Lukas Brabec <lbrabec@redhat.com>). · Explain WhyJul 28 2015, 12:42 PM
This revision was automatically updated to reflect the committed changes.