Fix support for multiple discover phases in upgrade execute plugin#4633
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the task gathering logic in the execute step by introducing a gather_tasks method in ExecutePlugin, which is then implemented for both internal and upgrade executors. The upgrade executor is also updated to correctly handle multiple discover phases, ensuring test names are restored on a per-phase basis. The changes are well-tested and improve the modularity of the execution step. My feedback includes a suggestion to improve the robustness of state restoration in the upgrade plugin by using try...finally blocks.
Note: Security Review is unavailable for this PR.
|
packit /test |
cf99977 to
b2ba77b
Compare
execute plugin. Extract task gathering logic for upgrade plugin into a dedicated gather_tasks method following the same pattern as internal (tmt) execute. Allow upgrade execute plugin to handle multiple discover phases by iterating through each phase when running tests before and after upgrade. Fix test name restoration to occur per-phase to avoid iteration order issues. Assisted-by: Cursor
Turned gather_tasks() into tasks() iterator Moved child function docstrings for tasks() into the function body Moved the extra discover phase to full.sh test to save time
Add TODOs decribing possible future refactors. Fix the upgrade tests by making the extra-phase plan its own plan.
b2ba77b to
0502fee
Compare
skycastlelily
left a comment
There was a problem hiding this comment.
LGTM,and all the tests passed locally :)
LecrisUT
left a comment
There was a problem hiding this comment.
Great, thanks a lot for the context and trackers
Extract task iterator logic for upgrade plugin into a dedicated tasks method following the same pattern as internal (tmt) execute.
Allow upgrade execute plugin to handle multiple discover phases by iterating through each phase when running tests before and after upgrade.
Fix test name restoration to occur per-phase to avoid iteration order issues.
Assisted-by: Cursor
Fixes: #3894
Pull Request Checklist