Project

General

Profile

action #77215

In jobs API data reference a parent job group name as well

Added by okurz 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2020-11-09
Due date:
2020-11-13
% Done:

0%

Estimated time:
Difficulty:

Description

Motivation

The jobs API data shows both the group_id as well as group (name) for a job but not the parent job group. For example

openqa-cli api --o3 jobs/1464990 | jq .

yields:

{
  "job": {
…
    "group": "Development Tumbleweed",
    "group_id": 38,
    "has_parents": 0,
    "id": 1464990,
    "name": "opensuse-Tumbleweed-DVD-x86_64-Build20201108-create_hdd_textmode_ext4@uefi",

for a job within the job group "Development Tumbleweed" which is below a parent job group "Development". Another example is https://gitlab.suse.de/qa-maintenance/openQABot/-/blob/master/openqabot/utils.py#L127 looking into the name of a job group if it starts with "Test" to call it a "Development" job group and hence ignore for QAM approval. This caused problems for a job within the job group "QAM HA-SAP" which is below the parent job group "Development" but not having "Development" or "Test" in the name itself.

Acceptance criteria

  • AC1: The parent job group name is available from jobs API data

Suggestions

  • Just add a field parent_group if not-null and learn quickly that it is never as easy like that ;)
  • Optional: Also include parent_group_id

Related issues

Related to openQA Tests - action #77956: [openQABot] openQA supports showing parent group name when getting a job detailsNew2020-11-16

History

#1 Updated by okurz 9 months ago

  • Description updated (diff)

#2 Updated by Xiaojing_liu 9 months ago

  • Due date set to 2020-11-13
  • Assignee set to Xiaojing_liu

#4 Updated by okurz 9 months ago

  • Status changed from Workable to In Progress

#5 Updated by okurz 9 months ago

PR merged. As soon as this is live, e.g. on o3, we can provide a suggestion for https://gitlab.suse.de/qa-maintenance/openQABot/-/blob/master/openqabot/utils.py#L127 , e.g. in form of a ticket.

#6 Updated by Xiaojing_liu 9 months ago

  • Status changed from In Progress to Feedback

The pr has been merged and deployed on o3.
The test result shows that:

openqa-cli api --o3 jobs/1470855 --pretty
{
   "job" : {
      ... ...
      "group" : "Development Tumbleweed",
      "group_id" : 38,
      "has_parents" : 0,
      "id" : 1470855,
      "name" : "opensuse-Tumbleweed-DVD-x86_64-Build20201113-create_hdd_textmode_ext4@uefi",
      "parent_group" : "Development",
      "parent_group_id" : 6,

Create a ticket https://progress.opensuse.org/issues/77956 to give a suggestion that using the parent group name.

#7 Updated by okurz 9 months ago

  • Related to action #77956: [openQABot] openQA supports showing parent group name when getting a job details added

#8 Updated by okurz 9 months ago

  • Status changed from Feedback to Resolved

nice! That should be good enough

Also available in: Atom PDF