Skip to content

Expose step-level queue of phases#4729

Merged
happz merged 3 commits intomainfrom
step-with-queue
Mar 31, 2026
Merged

Expose step-level queue of phases#4729
happz merged 3 commits intomainfrom
step-with-queue

Conversation

@happz
Copy link
Copy Markdown
Contributor

@happz happz commented Mar 23, 2026

Queues are "buried" inside go() methods, but if we want to support addition of new tasks from outside of the step, the queue needs to become step-level instance attribute so it can be modified from outside of go().

Related to #4726

Pull Request Checklist

  • implement the feature

@happz happz added this to planning Mar 23, 2026
@happz happz added code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. ci | full test Pull request is ready for the full test execution labels Mar 23, 2026
@github-project-automation github-project-automation bot moved this to backlog in planning Mar 23, 2026
@happz happz moved this from backlog to implement in planning Mar 23, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors how PhaseQueue is handled in various steps (cleanup, execute, finish, prepare) by introducing a new base class StepWithQueue. This new class initializes and holds the queue, making it a step-level attribute _queue instead of a local variable within go() methods. This change is intended to expose the queue for external modifications. The implementation is clean and consistent across all affected steps. I have one suggestion to improve the logger naming for the queue to avoid redundancy.

Comment thread tmt/steps/__init__.py
Comment thread tmt/steps/__init__.py
Comment thread tmt/steps/__init__.py
@happz happz marked this pull request as ready for review March 23, 2026 22:38
@happz happz moved this from implement to review in planning Mar 23, 2026
@happz happz force-pushed the step-with-queue branch 2 times, most recently from 7586db8 to 3ac5911 Compare March 25, 2026 22:39
@happz happz changed the base branch from main to queue-ordering March 25, 2026 22:39
@happz happz force-pushed the step-with-queue branch from 3ac5911 to 700ce4a Compare March 26, 2026 09:36
@thrix thrix added this to the 1.71 milestone Mar 27, 2026
Copy link
Copy Markdown
Contributor

@tcornell-bus tcornell-bus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor pointed out a few things and I verified

Comment thread tmt/queue.py Outdated
Comment thread tmt/steps/__init__.py
@tcornell-bus tcornell-bus self-assigned this Mar 27, 2026
@happz happz force-pushed the step-with-queue branch 3 times, most recently from 445e4a3 to ab7c95e Compare March 27, 2026 19:43
@thrix thrix assigned vaibhavdaren and LecrisUT and unassigned vaibhavdaren Mar 30, 2026
@happz happz mentioned this pull request Mar 30, 2026
2 tasks
@happz happz force-pushed the step-with-queue branch from ab7c95e to c2cff28 Compare March 30, 2026 12:55
@happz happz force-pushed the step-with-queue branch from c2cff28 to a5e59aa Compare March 30, 2026 13:03
@happz happz moved this from review to merge in planning Mar 30, 2026
Base automatically changed from queue-ordering to main March 31, 2026 08:20
happz added 3 commits March 31, 2026 10:34
Queues are "burried" inside `go()` methods, but if we want to support
addition of new tasks from outside of the step, the queue needs to
become step-level instance attribute so it can be modified from outside
of `go()`.

Related to #4726
@happz happz force-pushed the step-with-queue branch from a5e59aa to 9b30950 Compare March 31, 2026 08:40
@happz happz merged commit 892f5f0 into main Mar 31, 2026
32 checks passed
@happz happz deleted the step-with-queue branch March 31, 2026 11:00
@github-project-automation github-project-automation bot moved this from merge to done in planning Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way.

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

5 participants