Project

General

Profile

Actions

action #166559

closed

coordination #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

Added by okurz 3 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-11-07
Due date:
% Done:

0%

Estimated time:

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

Related issues 2 (0 open2 closed)

Copied to openQA Project (public) - action #167827: Restart multiple jobs with comment over APIResolvedmkittler2024-09-09

Actions
Copied to openQA Project (public) - action #170089: Every restarted job now posts comment "undefined"Resolvedtinita2024-11-07

Actions
Actions #1

Updated by livdywan 3 months ago

  • Subject changed from Restart filtered jobs from /tests/overview with comment to Restart filtered jobs from /tests/overview with comment size:M
  • Description updated (diff)
  • Status changed from New to Workable
Actions #2

Updated by ybonatakis 3 months ago

  • Status changed from Workable to In Progress
  • Assignee set to ybonatakis
Actions #3

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 triggers addComments js with a POST on apiv1_post_comments
  • Add comment on all currently shown jobs with Restart Here either I have to find a way to reuse the addComments and then loop over ids to call restart in one form action or split the actions in two?!

Any suggestions?

Actions #4

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 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 triggers addComments js with a POST on apiv1_post_comments
  • Add comment on all currently shown jobs with Restart Here either I have to find a way to reuse the addComments and then loop over ids to call restart 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.

Actions #5

Updated by tinita 3 months ago · Edited

IMHO restart is the more "important" operation, so I would add a route for batch restarting with comments instead of batch commenting with restart. (e.g. I wouldn't expect a job restart functionality under a /comments endpoint.)

Actions #6

Updated by ybonatakis 3 months ago

Actions #7

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

Actions #8

Updated by ybonatakis 3 months ago

  • Assignee deleted (ybonatakis)
Actions #9

Updated by okurz 3 months ago

  • Subject changed from Restart filtered jobs from /tests/overview with comment to Restart filtered jobs from /tests/overview with comment size:M
Actions #10

Updated by livdywan 3 months ago · Edited

Discussing this briefly to clarify:

Actions #11

Updated by ybonatakis 3 months ago

  • Status changed from Workable to In Progress
  • Assignee set to ybonatakis
Actions #12

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?

Actions #13

Updated by tinita 3 months ago

It's still the same requirement as before; comments should be written on the original jobs.
Just the backend API design suggestion has changed.

Actions #15

Updated by okurz 2 months ago

  • Copied to action #167827: Restart multiple jobs with comment over API added
Actions #16

Updated by okurz 2 months ago

  • Status changed from In Progress to Blocked

As discussed blocked on #167827

Actions #17

Updated by mkittler 2 months ago

  • Status changed from Blocked to Workable
Actions #18

Updated by ybonatakis 2 months ago

  • Status changed from Workable to In Progress
Actions #19

Updated by livdywan 2 months ago

  • Status changed from In Progress to Workable
Actions #20

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

Actions #21

Updated by okurz about 2 months ago

  • Status changed from Workable to In Progress
Actions #22

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.

Actions #23

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

Actions #24

Updated by tinita about 1 month ago

https://github.com/os-autoinst/openQA/pull/5971 was merged, and now tests in master are failing.

https://app.circleci.com/pipelines/github/os-autoinst/openQA/15201/workflows/bf17d820-6fd7-4600-aa79-9b9cb56691d8/jobs/145422

[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

Actions #26

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.

https://app.circleci.com/pipelines/github/os-autoinst/openQA/15201/workflows/bf17d820-6fd7-4600-aa79-9b9cb56691d8/jobs/145422

[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

Actions #27

Updated by ybonatakis about 1 month ago

  • Subtask #169525 added
Actions #28

Updated by ybonatakis about 1 month ago

i filed a new ticket for the progressIndicator and I am resolving this ticket.

Actions #29

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.

https://app.circleci.com/pipelines/github/os-autoinst/openQA/15201/workflows/bf17d820-6fd7-4600-aa79-9b9cb56691d8/jobs/145422

[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

Actions #30

Updated by okurz about 1 month ago

  • Subtask deleted (#169525)
Actions #31

Updated by ybonatakis about 1 month ago

  • Status changed from Feedback to Resolved
Actions #32

Updated by okurz 30 days ago

  • Copied to action #170089: Every restarted job now posts comment "undefined" added
Actions

Also available in: Atom PDF