action #91650
closedQA - 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
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¶
- Understand the current possibilities and limitations by using an existing openQA instance, e.g. see how a query like https://openqa.opensuse.org/tests/overview?groupid=1&groupid=3&t=2021-04-23+14%3A13%3A21+%2B0000 only shows "build 20210406" but https://openqa.opensuse.org/tests/overview?groupid=1&t=2021-04-23+14%3A13%3A21+%2B0000 instead shows "build 20210422" which was the most recent build at that time but only for x86_64 . If no useful data is visible anymore at the time of working on this ticket then update the timestamp to something more recent or remove it completely.
- Research the implications of the current algorithm to find the latest jobs based on the current queries
- Extend the test for the requirements
- Adapt job lookup and display algorithms
- It is ok if this feature is not immediately visible over the web UI but only mentioned in documentation, e.g. single sentence and example URL
Files
Updated by ilausuch over 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);
Updated by ilausuch over 3 years ago
To have a note, in our code
- the query is generated here https://github.com/os-autoinst/openQA/blob/577b4d3e1011846fb645c04cf611dfe0a7e9afb0/lib/OpenQA/BuildResults.pm#L152
- the visualization template is here https://github.com/os-autoinst/openQA/blob/master/templates/webapi/test/overview.html.ep
- The data processor https://github.com/os-autoinst/openQA/blob/577b4d3e1011846fb645c04cf611dfe0a7e9afb0/lib/OpenQA/WebAPI/Controller/Test.pm#L646
Updated by mkittler over 3 years ago
The query in 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 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.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.
Updated by ilausuch over 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
Updated by ilausuch over 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.
Updated by ilausuch over 3 years ago
- Status changed from Workable to In Progress
Updated by ilausuch over 3 years ago
The function compose_job_overview_search_args is implemented here
https://github.com/os-autoinst/openQA/blob/3dbc437d2627aec121ce305b9f7cf41a6f4a7067/lib/OpenQA/WebAPI/Plugin/Helpers.pm#L349
And we can see how the groupid and the build is filled
https://github.com/os-autoinst/openQA/blob/3dbc437d2627aec121ce305b9f7cf41a6f4a7067/lib/OpenQA/WebAPI/Plugin/Helpers.pm#L387
Updated by ilausuch over 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
Updated by openqa_review over 3 years ago
- Due date set to 2021-06-16
Setting due date based on mean cycle time of SUSE QE Tools
Updated by ilausuch over 3 years ago
I started a new approach
https://github.com/os-autoinst/openQA/pull/3928
Updated by ilausuch over 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
Updated by okurz over 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.
Updated by ilausuch over 3 years ago
- File example_groupids.png example_groupids.png added
This is solved with https://github.com/os-autoinst/openQA/pull/3918
I provide a visual example
Updated by ilausuch over 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)
Updated by ilausuch over 3 years ago
- Status changed from Resolved to In Progress
Updated by ilausuch over 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
Updated by ilausuch over 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
Updated by livdywan over 3 years ago
- Due date changed from 2021-06-16 to 2021-06-18
Updated by livdywan over 3 years ago
- Due date changed from 2021-06-18 to 2021-06-25
Updated by okurz over 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.
Updated by okurz over 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