action #62738
closedAllow testsuite: null in Jobtemplate YAML
0%
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.
Updated by tinita over 4 years ago
- Blocks coordination #55730: [epic] Move parameters from test suites into job groups added
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.
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.
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.
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.
Updated by tinita over 4 years ago
Related PR: https://github.com/os-autoinst/openQA/pull/2711