Project

General

Profile

Actions

action #91650

closed

QA - coordination #91646: [saga][epic] SUSE Maintenance QA workflows with fully automated testing, approval and release

coordination #91467: [epic] Surface openQA failures per squad in a single place

Resolve the most recent builds per job group on /tests/overview when showing multiple job groups

Added by okurz about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-04-23
Due date:
% Done:

0%

Estimated time:

Description

Motivation

Some teams need to review more than one job group. /tests/overview already accepts as parameter multiple job groups by id but that only resolves tests from the most recent build of any of the job groups, not for each

Acceptance criteria

  • AC1: /tests/overview (or a equivalent view) for multiple job groups shows the most recent build for each job group

Suggestions


Files

example_groupids.png (242 KB) example_groupids.png ilausuch, 2021-06-18 08:22

Related issues 1 (0 open1 closed)

Copied to openQA Project - action #94732: Provide link to /tests/overview of latest builds of all job groups within a parent job group size:MResolvedilausuch

Actions
Actions #1

Updated by okurz almost 3 years ago

  • Parent task changed from #91467 to #91914
Actions #2

Updated by okurz almost 3 years ago

  • Target version changed from future to Ready
Actions #3

Updated by ilausuch almost 3 years ago

  • Assignee set to ilausuch
Actions #4

Updated by ilausuch almost 3 years ago

I checked that we have a way to extract the last build for every job_group

SELECT distinct(group_id), FIRST_VALUE(build) over (partition by group_id order by t_created DESC) FROM jobs WHERE group_id in (1,3);
Actions #6

Updated by mkittler almost 3 years ago

The query in BuildResults.pm is for the "dashboard", that's the index page and group pages. This ticket is about the "test results overview" which has nothing to do with it. Its controller is the function overview within Test.pm (which you've called "data processor", not sure what you mean by that). Btw, I'm usually having a look at WebAPI.pm to check which route is handled where. Ah, I guess I now get it. You mean the links to the test results overview which are present on the dashboard are generated by code in BuuildResults.pm. Not sure whether/how we should alter links on the dashboard for this, though.

It might be a bit tricky to convince DBIx to do a query like the one you've mentioned but rewriting the code to use a native SQL query is possibly also quite an effort because there's already lots of code which is using the DBIx result object.

Actions #7

Updated by ilausuch almost 3 years ago

Yes, I agree with you.
I am exploring an other option is to split the query (that contains different groupsid) and merge the results later
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Test.pm#L646

Actions #8

Updated by ilausuch almost 3 years ago

Regarding that,

When a only group is selected, the $search_args used in the query shows

{
  'groupids' => [
                  60
                ],
  'scope' => 'current',
  'build' => 'GM',
  'groupid' => 60
}

and for more than one group

{
  'scope' => 'current',
  'build' => '20210507',
  'groupids' => [
                  1,
                  60
                ],
  'groupid' => 1
}

We can see that the function compose_job_overview_search_args is filling the scope, build and groupid of the first group we select.

Actions #9

Updated by ilausuch almost 3 years ago

  • Status changed from Workable to In Progress
Actions #11

Updated by ilausuch almost 3 years ago

Trying to do an approach here https://github.com/os-autoinst/openQA/pull/3925.
Disclaimer: this doesn't work yet, is still a draft

Actions #12

Updated by openqa_review almost 3 years ago

  • Due date set to 2021-06-16

Setting due date based on mean cycle time of SUSE QE Tools

Actions #14

Updated by ilausuch almost 3 years ago

  • File openQA Test summary.html added

http://localhost:9526/tests/overview?distri=sle&version=15-SP3&arch=x86_64&build=187.1&groupid=110

  • Flavor: Migration-from-SLE11-SP4
  • Flavor: Migration-from-SLE12-SPx
  • Flavor: Migration-from-SLE15-SPx

http://localhost:9526/tests/overview?distri=sle&version=15-SP3&arch=x86_64&build=187.1&groupid=110

  • Flavor: Full
  • Flavor: Online

With the selecction of both groupid return the addition of both groupid's
http://localhost:9526/tests/overview?distri=sle&version=15-SP3&arch=x86_64&build=187.1&groupid=110&groupid=265

Actions #15

Updated by okurz almost 3 years ago

  • File deleted (openQA Test summary.html)
Actions #16

Updated by okurz almost 3 years ago

@ilausuch I have deleted the attachment as it might include sensitive internal data. I suggest if possible to use data from openqa.opensuse.org for demonstration purposes as all the relevant data from there is already public so we don't have a problem to share that.

Actions #17

Updated by ilausuch almost 3 years ago

Ok, sorry

Actions #18

Updated by ilausuch almost 3 years ago

This is solved with https://github.com/os-autoinst/openQA/pull/3918
I provide a visual example

Actions #19

Updated by ilausuch almost 3 years ago

  • Status changed from In Progress to Resolved

We have already a test for multiple group ids
https://github.com/os-autoinst/openQA/blob/a6560e42378e7ac43c70d4d444ab9cd9921e2a67/t/10-tests_overview.t#L223
So I think this ticket is complete (with Oliver's finals help)

Actions #20

Updated by ilausuch almost 3 years ago

  • Status changed from Resolved to In Progress
Actions #21

Updated by ilausuch almost 3 years ago

I identified a case where doesn't work using only https://github.com/os-autoinst/openQA/pull/3918

http://localhost:9526/tests/overview?groupid=198&groupid=287
Actions #22

Updated by ilausuch almost 3 years ago

Updated: The problem is that the query is only going to show the jobs for only one build. Then if the groupsid we choose has different builds only will be selected one of them.
the problem is in _compose_job_overview_search_args(Helpers.pm) that takes the last_build for the first group_id

Actions #23

Updated by livdywan almost 3 years ago

  • Due date changed from 2021-06-16 to 2021-06-18
Actions #24

Updated by livdywan almost 3 years ago

  • Due date changed from 2021-06-18 to 2021-06-25
Actions #25

Updated by okurz almost 3 years ago

  • Status changed from In Progress to Resolved

replacement PR https://github.com/os-autoinst/openQA/pull/3973 , merged. I waited until the package was built and manually deployed it so that we can immediately verify it on o3. https://openqa.opensuse.org/tests/overview?groupid=81&groupid=70 shows how two results from two independent builds ":16451:lsb.1623764292,:16590:prometheus-ha_cluster_exporter.1624456142" show up.

Actions #26

Updated by okurz almost 3 years ago

  • Copied to action #94732: Provide link to /tests/overview of latest builds of all job groups within a parent job group size:M added
Actions #27

Updated by livdywan almost 3 years ago

  • Due date deleted (2021-06-25)
Actions #28

Updated by okurz almost 3 years ago

  • Parent task changed from #91914 to #91467
Actions

Also available in: Atom PDF