action #166559
closedcoordination #154768: [saga][epic][ux] State-of-art user experience for openQA
coordination #166556: [epic] Improved test reviewer user experience - Restart filtered jobs from /tests/overview
Restart filtered jobs from /tests/overview with comment size:M
0%
Description
Motivation¶
On test overview pages like https://openqa.opensuse.org/tests/overview?distri=opensuse&version=Tumbleweed&groupid=1 we already have a comment button which allows to add a comment on all currently shown jobs, i.e. depending on the current filter selection. With the same filter now we can also add a possibility to restart the according filtered jobs, either with or without a corresponding comment.
Let's start with an option to comment and restart the selected jobs.
Acceptance criteria¶
- AC1: Users with operator level can restart all currently filtered jobs from /tests/overview
- AC2: Jobs that are not shown on the filtered view are not restarted except for necessary dependencies
- AC3: Users below the operator level are not able to restart jobs
Suggestions¶
- Take a look on https://openqa.opensuse.org/tests/overview?distri=opensuse&version=Tumbleweed&groupid=1, ensure you are logged in and explore the existing "comment" icon
- Change the grey comment icon on /tests/overview to visualize that the action is there to "comment and/or restart"
- Trigger the same simple restart that is available next to individual jobs (check the code to be sure whatever it does)
- Do not add another button on the level of /tests/overview directly
- Pick a good color combination for the backgrounds of the button
- Consider a drop-down menu instead of individual buttons
- Be ready for a longer discussion in pull requests based on your screenshot proposals how it could look like :)
Out of scope¶
- Being able to select individual jobs.
- Restarting without comment. That can come later as part of the parent epic #166556
Updated by ybonatakis 3 months ago
- Status changed from Workable to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis 3 months ago
I am troubled a bit with the proper design.
We have a modal Elem which calls apiv1_post_comments
I have create two links:
Add comment on all currently shown jobs
this is exactly what we have until now.onsubmit
triggersaddComments
js with a POST onapiv1_post_comments
Add comment on all currently shown jobs with Restart
Here either I have to find a way to reuse theaddComments
and then loop over ids to callrestart
in one form action or split the actions in two?!
Any suggestions?
Updated by okurz 3 months ago
ybonatakis wrote in #note-3:
I am troubled a bit with the proper design.
We have a modal Elem which callsapiv1_post_comments
I have create two links:
Add comment on all currently shown jobs
this is exactly what we have until now.onsubmit
triggersaddComments
js with a POST onapiv1_post_comments
Add comment on all currently shown jobs with Restart
Here either I have to find a way to reuse theaddComments
and then loop over ids to callrestart
in one form action or split the actions in two?!Any suggestions?
I think the best way is to either extend the existing API method or create an according new API route as target for "Add comment on all currently shown jobs with Restart" and do the iteration over the currently shown jobs there. Don't iterate over the jobs in the Javascript code.
Updated by ybonatakis 3 months ago
(draft) https://github.com/os-autoinst/openQA/pull/5946 without tests yet
Updated by ybonatakis 3 months ago
- Subject changed from Restart filtered jobs from /tests/overview with comment size:M to Restart filtered jobs from /tests/overview with comment
- Status changed from In Progress to Workable
back to workable due to open discussion and change direction in the implementation https://suse.slack.com/archives/C02AJ1E568M/p1727259601332579 and https://suse.slack.com/archives/C02AJ1E568M/p1727259594106919
Updated by livdywan 3 months ago · Edited
Discussing this briefly to clarify:
- The current proposal in https://github.com/os-autoinst/openQA/pull/5946/ adds restarting via the comment API route. Most likely approaching it from the job API is semantically better as we may need restarting without comments, or other features unrelated to comments i.e.
/api/v1/jobs/restart
as implemented in https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/API/V1/Job.pm#L810 https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/API/V1/Comment.pm#L178
Updated by ybonatakis 3 months ago
- Status changed from Workable to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis 3 months ago
I need some details of the feature.
Restart filtered jobs from /tests/overview with comment
implies to comment the restarted jobs, right? because the feature as is comments the current jobs. or is there a scenario in this feature that the comment is written in the current list of jobs and then restarts the job?
Updated by ybonatakis 3 months ago
Updated by okurz 2 months ago
- Copied to action #167827: Restart multiple jobs with comment over API added
Updated by ybonatakis 2 months ago
I updated the PR addressing the comment about the formaction (replacing the data-*) and some other smaller things. Still open https://github.com/os-autoinst/openQA/pull/5971#discussion_r1801488703
Updated by okurz about 2 months ago
- Status changed from Workable to In Progress
Updated by livdywan about 2 months ago
Discussed in the unblock. @ybonatakis found a working approach and will push an update after cleaning it up. Unit test coverage to be confirmed.
Updated by ybonatakis about 2 months ago
- Status changed from In Progress to Feedback
get two approvals and waiting for Marius as the latest changes come from his review.
Now the restarts are handled by the restartJob function which handles also the individual job restarts
Updated by tinita about 1 month ago
https://github.com/os-autoinst/openQA/pull/5971 was merged, and now tests in master are failing.
[12:48:23] t/ui/10-tests_overview.t ................... 25/?
# Failed test 'Scheduled jobs are displayed'
# at t/ui/10-tests_overview.t line 633.
# got: '6'
# expected: '4'
# Looks like you failed 1 test of 3.
# Failed test 'result filter does not affect scheduled and running jobs'
# at t/ui/10-tests_overview.t line 637.
[12:48:23] t/ui/10-tests_overview.t ................... 27/? # Looks like you failed 1 test of 27.
[12:48:23] t/ui/10-tests_overview.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/27 subtests
The test was added as part of https://github.com/os-autoinst/openQA/pull/6044 so I commented there as well: #65205
Updated by ybonatakis about 1 month ago
Updated by ybonatakis about 1 month ago
tinita wrote in #note-24:
https://github.com/os-autoinst/openQA/pull/5971 was merged, and now tests in master are failing.
[12:48:23] t/ui/10-tests_overview.t ................... 25/? # Failed test 'Scheduled jobs are displayed' # at t/ui/10-tests_overview.t line 633. # got: '6' # expected: '4' # Looks like you failed 1 test of 3. # Failed test 'result filter does not affect scheduled and running jobs' # at t/ui/10-tests_overview.t line 637. [12:48:23] t/ui/10-tests_overview.t ................... 27/? # Looks like you failed 1 test of 27. [12:48:23] t/ui/10-tests_overview.t ................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/27 subtests
The test was added as part of https://github.com/os-autoinst/openQA/pull/6044 so I commented there as well: #65205
I just saw that. checking
Updated by ybonatakis about 1 month ago
i filed a new ticket for the progressIndicator and I am resolving this ticket.
Updated by ybonatakis about 1 month ago
ybonatakis wrote in #note-26:
tinita wrote in #note-24:
https://github.com/os-autoinst/openQA/pull/5971 was merged, and now tests in master are failing.
[12:48:23] t/ui/10-tests_overview.t ................... 25/? # Failed test 'Scheduled jobs are displayed' # at t/ui/10-tests_overview.t line 633. # got: '6' # expected: '4' # Looks like you failed 1 test of 3. # Failed test 'result filter does not affect scheduled and running jobs' # at t/ui/10-tests_overview.t line 637. [12:48:23] t/ui/10-tests_overview.t ................... 27/? # Looks like you failed 1 test of 27. [12:48:23] t/ui/10-tests_overview.t ................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/27 subtests
The test was added as part of https://github.com/os-autoinst/openQA/pull/6044 so I commented there as well: #65205
I just saw that. checking
I guess that have been fixed in the meantime. I see the pipeline passes
Updated by ybonatakis about 1 month ago
- Status changed from Feedback to Resolved
Updated by okurz 30 days ago
- Copied to action #170089: Every restarted job now posts comment "undefined" added