Suspend execution of tasks #6090
Conversation
52ef928 to
5101e9a
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6090 +/- ##
==========================================
+ Coverage 68.34% 69.55% +1.21%
==========================================
Files 205 205
Lines 22268 22153 -115
==========================================
+ Hits 15219 15409 +190
+ Misses 7049 6744 -305 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aeb256a to
852a64e
Compare
a09dcd6 to
b76dc76
Compare
clebergnu
left a comment
There was a problem hiding this comment.
Hi @richtja,
Thank you for the work in this feature!
The direction of this work, that is, implementing the pause/resume of tasks in the Spawner is definitely correct IMO. What I don't get is the scope of the refactor. AFAICT:
- The "PythonBaseRunner" is unclear in its purpose (it ends up not being for Python code, that is,
python-unittestandavocado-instrumentedonly) - The refactor leaves some duplication of the logic of monitoring the updates within a runner (that is,
PythonBaseRunner._monitor()andBaseRunner.running_loop(). - It introduces a mostly uniform approach to write new runners, but still leaves some runners out (e.g.
exec-test).
Can you elaborate on those points? Thanks!
13ca48d to
632e9bd
Compare
|
Hi @clebergnu, I did a refactor to move all the common code under the |
This is a refactoring of runners. It moves most of the code related to running and monitoring processes into base class. This change removes duplicities across the runners, and it will help with implementation of common features like signal handling. Also it makes the future development of new runners easier, because developers can focus on actual runner and don't have to deal with things like process monitoring, logging and exception handling Signed-off-by: Jan Richter <jarichte@redhat.com>
This is a removal of legacy code for signal handling. This signal handling was useful for the legacy runner where all tasks were running in child processes. But now when we use spawners for creating tasks each with different implementation, we need to handle the signal handling in the spawners itself. Signed-off-by: Jan Richter <jarichte@redhat.com>
4d4adc8 to
573d600
Compare
This commit introduces the suspend execution feature to the nrunner. The suspend execution was available on the legacy runner, but we didn't move it to the nrunner. With this feature, it is possible to pause execution of python based task on process spawner by sending SIGTSTP signal (ctrl+z). It is helpful for debugging test execution. Reference: avocado-framework#6059 Signed-off-by: Jan Richter <jarichte@redhat.com>
573d600 to
0bda174
Compare
|
Closing this PR due to current team constraints following our recent restructuring. This is part of a broader effort to triage all in-flight work across our upstream repos. If this work is still needed, please feel free to reopen and it will be picked up. Apologies for any inconvenience. |
This PR introduces the suspend execution feature to the nrunner. The
suspend execution was available on the legacy runner, but we didn't move
it to the nrunner. With this feature, it is possible to pause execution
of python based task on process spawner by sending SIGTSTP signal
(ctrl+z). It is helpful for debugging test execution.
Reference: #6059
Signed-off-by: Jan Richter jarichte@redhat.com