python_directive: add debug information about executed method
ClosedPublic

Authored by kparal on Jul 4 2014, 2:31 PM.

Details

Summary

This helps users to identify what exactly just got executed with what
arguments. It also helps with long-running python scripts without output

  • at least you know what's happening.

New output in rpmlint:

[libtaskotron:runner.py:100] 2014-07-04 15:38:56 DEBUG   Executing directive: python
[libtaskotron:python_directive.py:154] 2014-07-04 15:38:56 INFO    Executing Python: run_rpmlint.run() with args {'workdir': '/var/tmp/taskotron/task-9opm90'}
[libtaskotron:runner.py:100] 2014-07-04 15:38:59 DEBUG   Executing directive: resultsdb
[libtaskotron:resultsdb_directive.py:167] 2014-07-04 15:38:59 INFO    TAP is OK.

in upgradepath:

[libtaskotron:runner.py:41] 2014-07-04 15:38:44 DEBUG   Current workdir: /var/tmp/taskotron/task-QVeRAO
[libtaskotron:runner.py:100] 2014-07-04 15:38:44 DEBUG   Executing directive: python
[libtaskotron:python_directive.py:154] 2014-07-04 15:38:44 INFO    Executing Python: upgradepath.main() with args {'custom_args': ['--debug', 'f20-updates']}

in depcheck:

[libtaskotron:runner.py:100] 2014-07-04 15:43:16 DEBUG   Executing directive: python
[libtaskotron:python_directive.py:154] 2014-07-04 15:43:16 INFO    Executing Python: run_depcheck.taskotron_run() with args {'workdir': '/var/tmp/taskotron/task-jSwItD', 'report_format': 'updates', 'rpms': ['/var/tmp/taskotron/task-jSwItD/downloaded_tag/'], 'arch': ['x86_64'], 'repos': [{'f19': 'http://download.fedoraproject.org/pub/fedora/linux/releases/19/Everything/x86_64/os', 'f19-updates': 'http://download.fedoraproject.org/pub/fedora/linux/updates/19/x86_64'}, {'workdir_repo': '/var/tmp/taskotron/task-jSwItD/downloaded_tag/'}]}
running depcheck for /var/tmp/taskotron/task-jSwItD/downloaded_tag/sylpheed-3.4.2-1.fc19.x86_64.rpm
running depcheck for /var/tmp/taskotron/task-jSwItD/downloaded_tag/pcre-8.32-9.fc19.i686.rpm

I wondered a bit whether I should use INFO or DEBUG level for it. In the end I assumed INFO is better, because it can potentially be long-running and without output (from the python script), so it falls into the category "inform user what's going on".

Test Plan

unit tests adjusted, manually ran our major checks

Diff Detail

Repository
rLTRN libtaskotron
Lint
Lint Skipped
Unit
Unit Tests Skipped
kparal retitled this revision from to python_directive: add debug information about executed method.Jul 4 2014, 2:31 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: tflink, jskladan, mkrizek.
This revision is now accepted and ready to land.Jul 8 2014, 12:53 PM
kparal closed this revision.Jul 8 2014, 12:59 PM
kparal updated this revision to Diff 537.

Closed by commit rLTRN122ba668d1c8 (authored by @kparal).