Project

General

Profile

action #91650

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 3 months ago. Updated 16 days ago.

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

0%

Estimated time:
Difficulty:

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

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

Related issues

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

History

#1 Updated by okurz 3 months ago

  • Parent task changed from #91467 to #91914

#2 Updated by okurz 2 months ago

  • Target version changed from future to Ready

#3 Updated by ilausuch 2 months ago

  • Assignee set to ilausuch

#4 Updated by ilausuch 2 months 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);

#6 Updated by mkittler 2 months 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.

#7 Updated by ilausuch 2 months 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

#8 Updated by ilausuch 2 months 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.

#9 Updated by ilausuch 2 months ago

  • Status changed from Workable to In Progress

#11 Updated by ilausuch 2 months 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

#12 Updated by openqa_review 2 months ago

  • Due date set to 2021-06-16

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

#13 Updated by ilausuch 2 months ago

#14 Updated by ilausuch about 2 months 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

#15 Updated by okurz about 2 months ago

  • File deleted (openQA Test summary.html)

#16 Updated by okurz about 2 months 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.

#17 Updated by ilausuch about 2 months ago

Ok, sorry

#18 Updated by ilausuch about 2 months ago

11539

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

#19 Updated by ilausuch about 2 months 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)

#20 Updated by ilausuch about 2 months ago

  • Status changed from Resolved to In Progress

#21 Updated by ilausuch about 1 month 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

#22 Updated by ilausuch about 1 month 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

#23 Updated by cdywan about 1 month ago

  • Due date changed from 2021-06-16 to 2021-06-18

#24 Updated by cdywan about 1 month ago

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

#25 Updated by okurz about 1 month 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.

#26 Updated by okurz about 1 month 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

#27 Updated by cdywan about 1 month ago

  • Due date deleted (2021-06-25)

#28 Updated by okurz 16 days ago

  • Parent task changed from #91914 to #91467

Also available in: Atom PDF