1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-07-13 00:51:33 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Adam Williamson
f966128089 fifloader: require group_name to be set via product
I've always hated the magic group name derivation in fifloader,
and it prevents it being used by anyone but Fedora. This fixes
that by requiring group_name to be set in the Products. This is
an executive decision, but it makes sense at least with how
Fedora uses openQA. If other users who might want to adopt
fifloader *don't* have a 100% assocation from products to job
groups, we can introduce more ways to set it in future, I guess.

I made it compulsory because it feels weird to have job templates
that aren't in groups...I don't even know how those get shown in
the web UI. But if there's a real use case for this we can make
it optional.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-20 17:59:06 -07:00
Adam Williamson
900629606b Allow nested ProfileGroups
OK, this is getting kinda close to over-engineering, but what
the heck. With this, a profile group can contain another profile
group. There is no infinite recursion protection yet.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-16 12:43:18 -07:00
Adam Williamson
4781fc28ce Fix profile and group merging
Any of the four might not exist. At least *one* of the four has
to exist, but we can't rely on any particular one existing, so we
have to be very defensive. The only rule is that at least one
out of profiles and groups has to exist after merge.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-16 11:53:53 -07:00
Adam Williamson
bdf74e74b4 Add ProfileGroups
This is another new convenience feature. Groups of profiles let
us avoid repeating commonly-used sets. A test suite can specify
a group of profiles, with a base priority. The priority value
for each profile within the ProfileGroup is added to the base
priority in the test suite.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-14 17:40:38 -07:00
Adam Williamson
99638a0c25 fifloader: add ProductDefaults
This adds another new fifloader-only top-level concept,
ProductDefaults. This just contains default values for all
products (on a per-file basis; these are applied *before* file
merge happens).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-10 13:48:13 -07:00
Adam Williamson
9724beb60d fifloader: introduce Flavors concept
I noticed that products with the same flavor often repeat the
same settings. Let's use our intermediate format to reduce this
repetition. We'll add a top-level dict for Flavors which allows
them to have settings, then in reverse_qol, for each product,
merge in the flavor's settings. Conflicts are resolved in favor
of the product.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-10 12:30:30 -07:00
Adam Williamson
e0ac7b3ca5 Add some missing test coverage for fifloader
Mainly covering the retry stuff, but also another thing that's
been missing for a while but which we totally can cover.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-01-18 11:41:01 -08:00
Adam Williamson
0b55fda6f5 Update copyright statements to current RH recommendations
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-06-01 13:31:56 -07:00
Adam Williamson
214f2cc8eb Add fifloader tests, template schemas, update README
This adds a test suite for fifloader (renamed fifloader.py for
test sanity). It adds JSON Schema form schemas for both FIF and
upstream openQA template data, and has fifloader (optionally,
but by default) validate both input and output data against the
schemas. It also adds a tox.ini configured to run the fifloader
tests, use fifloader to validate the template files, and do diff
coverage and lint checks. It also adjusts the Zuul config to run
tox instead of the test job.

There are also some pylint cleanups, since the new tests run
pylint.

fifcheck, fifconverter and tojson.pm are removed, as they were
mainly only needed for one-time conversion of the old format
templates; now they are in the git history we can always recover
them if we need them.

Along with all this I updated the README a bit to explain some
of it (and explain FIF better), and to explicitly state that this
repo is GPLv2+ licensed, and added GPL headers to some of the
files.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-01-29 22:45:38 -08:00