Project

General

Profile

Actions

action #62738

closed

Allow testsuite: null in Jobtemplate YAML

Added by tinita over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2020-01-28
Due date:
% Done:

0%

Estimated time:

Description

It should be allowed to use

scenarios:
  x86_64:
    opensuse-Tumbleweed-DVD-x86_64:
    - testname:
        testsuite: null
        ...

to specify that there is no Testsuite from the database involved.


Related issues 1 (0 open1 closed)

Blocks openQA Project - coordination #55730: [epic] Move parameters from test suites into job groupsResolvedokurz2019-09-06

Actions
Actions #1

Updated by tinita over 4 years ago

Actions #2

Updated by tinita over 4 years ago

  • Status changed from New to In Progress
Actions #3

Updated by tinita over 4 years ago

Adapting the schema and the code was easy, however the unique constraint in job_templates needs to be different.

https://stackoverflow.com/questions/8289100/create-unique-constraint-with-null-columns

Instead of:

CONSTRAINT scenario UNIQUE (product_id, machine_id, name, test_suite_id)

we would need something like that:

CREATE UNIQUE INDEX scenario1 ON job_templates (product_id, machine_id, name, test_suite_id)
WHERE test_suite_id IS NOT NULL;
CREATE UNIQUE INDEX scenario2 ON job_templates (product_id, machine_id, name)
WHERE test_suite_id IS NULL;

But this is only possible by manually adding the SQL to the deployment. Still trying to find out how.

Actions #4

Updated by tinita over 4 years ago

Supporting this kind of manual constraint will be a bit of work - finding out how to do it, and maintaining it in the future.

Using a "really" empty testsuite entry in the database (but still using null in the YAML) might be the easier solution.

If the empty testsuite does not yet exist, it will be created if a Jobtemplate is using it.

Actions #5

Updated by livdywan over 4 years ago

I'd rather not complicate it to that extent, an empty test suite really isn't a bad option so long as we ensure it's always available or created as needed.

+1 on using a dedicated base test suite that's always available.

Actions #6

Updated by tinita over 4 years ago

  • Status changed from In Progress to Feedback

PR https://github.com/os-autoinst/openQA/pull/2709 - Support 'testsuite: null' in jobtemplates
was merged

We still need to add docs, when we finally want users to use that feature.

Actions #9

Updated by tinita over 4 years ago

  • Status changed from Feedback to Resolved

Working in o3

Actions

Also available in: Atom PDF