action #62738

Allow testsuite: null in Jobtemplate YAML

Added by tinita 2 months ago. Updated about 1 month ago.

Status:ResolvedStart date:28/01/2020
Priority:NormalDue date:
Assignee:tinita% Done:


Category:Feature requests
Target version:Current Sprint


It should be allowed to use

    - testname:
        testsuite: null

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

Related issues

Blocks openQA Project - action #55730: [epic] Move parameters from test suites into job groups Blocked 06/09/2019 27/11/2020


#1 Updated by tinita 2 months ago

  • Blocks action #55730: [epic] Move parameters from test suites into job groups added

#2 Updated by tinita 2 months ago

  • Status changed from New to In Progress

#3 Updated by tinita 2 months ago

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

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.

#4 Updated by tinita 2 months 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.

#5 Updated by cdywan 2 months 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.

#6 Updated by tinita 2 months ago

  • Status changed from In Progress to Feedback

PR - Support 'testsuite: null' in jobtemplates
was merged

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

#9 Updated by tinita about 1 month ago

  • Status changed from Feedback to Resolved

Working in o3

Also available in: Atom PDF