action #77215
In jobs API data reference a parent job group name as well
0%
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
History
#1
Updated by okurz over 2 years ago
- Description updated (diff)
#2
Updated by Xiaojing_liu over 2 years ago
- Due date set to 2020-11-13
- Assignee set to Xiaojing_liu
#3
Updated by Xiaojing_liu over 2 years ago
#4
Updated by okurz over 2 years ago
- Status changed from Workable to In Progress
#5
Updated by okurz over 2 years 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 over 2 years 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 over 2 years ago
- Related to action #77956: [openQABot] openQA supports showing parent group name when getting a job details added
#8
Updated by okurz over 2 years ago
- Status changed from Feedback to Resolved
nice! That should be good enough