action #179996
openConverting job templates yaml to use in SCENARIO_DEFINITIONS_YAML
0%
Description
Is it possible to convert a YAML job template to use it in SCENARIO_DEFINITIONS_YAML?
For example, there is a job template yaml:
$ openqa-cli api job_templates_scheduling/54 | jq -r
defaults:
x86_64:
machine: 64bit
priority: 50
products:
dstr-v1-iso-x86_64:
distri: dstr
version: 'v1'
flavor: iso
dstr-v1-net-x86_64:
distri: dstr
version: 'v1'
flavor: net
scenarios:
x86_64:
dstr-v1-iso-x86_64:
- ts1
dstr-v1-net-x86_64:
- ts2
Is there a way to convert this into a YAML file like this:
$ cat test.yaml
---
products:
dstr-v1-iso:
distri: "dstr"
flavor: "iso"
arch: "x86_64"
version: 'v1'
dstr-v1-iso:
distri: "dstr"
flavor: "net"
arch: "x86_64"
version: 'v1'
machines:
64bit:
backend: "qemu"
job_templates:
ts1:
machine: 64bit
product: "dstr-v1-iso"
settings: {}
ts2:
machine: 64bit
product: "dstr-v1-net"
settings: {}
that it can be used when running tests?:
openqa-cli api -X POST isos --param-file SCENARIO_DEFINITIONS_YAML=test.yaml DISTRI=dstr VERSION=v1 FLAVOR=iso ARCH=x86_64 BUILD=_TEST ISO=distr-x86_64.iso
(This example is small and it can manually convert yaml, but with a large number of tests it may take a long time)
And also, is it possible to specify several machines or product in one test, for example:
ts1:
machine: [64bit, 64bit_uefi]
product: "dstr-v1-iso"
settings: {}
(this yaml is not being validated by OpenQA)
Acceptance Criteria¶
- AC1:
Suggestions¶
- Wait for OP to provide more context to understand the use case
- Proof of Concept script to convert a job group template to a scenario file from #155218: https://gist.github.com/perlpunk/f9022ce90f6dc1507a2b6afe61fcfbd7
- File follow-up tickets
Updated by okurz about 1 month ago
- Tags set to reactive work
- Target version set to Ready
Updated by tinita about 1 month ago
- Related to action #155218: [spike][timeboxed:30h] Use scenario definitions instead of job group templates for os-autoinst-distri-opensuse size:M added
Updated by tinita about 1 month ago
As part of #155218 I wrote a script for automatic conversion. I think there were some cases where it would not work correctly, so it depends on the current YAML file. That's also one reason why it's not part of the openQA package yet.
We are also still thinking about changing the structure of the scenarios.
Which job group is it? I could run the script and we'll see if it works as expected.
Updated by livdywan about 1 month ago
- Subject changed from Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML to Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML size:S
- Description updated (diff)
- Status changed from New to Workable
Updated by tinita 25 days ago
- Status changed from Workable to Feedback
- Assignee set to tinita
@zagagyka I got no feedback from you so far. I assume this is not about one of our SUSE openQA instances?
I can only provide you the Proof of Concept script I created:
https://gist.github.com/perlpunk/f9022ce90f6dc1507a2b6afe61fcfbd7
It has an example for job group number 1, and you should be able to adjust it to your instance and job group.
Updated by livdywan 23 days ago
- Subject changed from Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML size:S to Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML
- Description updated (diff)
- Status changed from Feedback to New
- Assignee deleted (
tinita) - Target version changed from Ready to Tools - Next
Let's wait for the OP to get back to us with a user story and re-estimate it. In the meanwhile taking it off the backlog.