Project

General

Profile

Actions

action #179996

open

Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML

Added by zagagyka about 1 month ago. Updated 18 days ago.

Status:
Feedback
Priority:
Low
Assignee:
Category:
Support
Target version:
Start date:
2025-04-03
Due date:
% Done:

0%

Estimated time:

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


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #155218: [spike][timeboxed:30h] Use scenario definitions instead of job group templates for os-autoinst-distri-opensuse size:MResolvedtinita

Actions
Actions #1

Updated by okurz about 1 month ago

  • Tags set to reactive work
  • Target version set to Ready
Actions #2

Updated by okurz about 1 month ago

  • Priority changed from Normal to High
Actions #3

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
Actions #4

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.

Actions #5

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
Actions #6

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.

Actions #7

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.

Actions #8

Updated by okurz 19 days ago

  • Target version changed from Tools - Next to Ready
Actions #9

Updated by livdywan 18 days ago

Target version changed from Tools - Next to Ready

Did you change this by accident? Just wondering since there's nothing else mentioned here 🙃

Actions #10

Updated by okurz 18 days ago

  • Status changed from New to Feedback
  • Assignee set to okurz
  • Priority changed from High to Low
  • Target version changed from Ready to future

I wasn't aware of the previous change. I will pick up the ticket and wait for the feedback outside the backlog then.

Actions

Also available in: Atom PDF