-
Notifications
You must be signed in to change notification settings - Fork 361
Suspend execution of tasks #6090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
52ef928 to
5101e9a
Compare
Codecov ReportAttention: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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