Suspend execution of tasks #6090
Draft
richtja wants to merge 3 commits intoavocado-framework:masterfrom
Draft
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
reviewed
Apr 7, 2025
Contributor
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
Contributor
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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