It now includes a better explanation of *why* fifloader exists,
and the fundamental design difference between fifloader and both
upstream formats. But to compensate, the other bits are made more
concise, hopefully without losing any useful information.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
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>
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>
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>
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>
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>
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>
subprocess.run raises an exception by default if the command
fails, you don't have to look for the return code.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
load_templates often fails for no good reason - see
https://progress.opensuse.org/issues/121378 . This makes
fifloader retry 20 times on failure to mitigate the issue.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This sets us up to test the release-blocking aarch64 disk images
(Minimal, Server and Workstation). It also allows for testing
armhfp disk images on aarch64 worker hosts (though my testing of
that isn't going too well so far), and fixes the initial-setup
handling for a change upstream ('use password' is now the default
so we don't need to choose it). We rewire disk image deployment
test loading to work through the generic loader code rather than
using ENTRYPOINT, as it allows us to more gracefully handle
graphical (Workstation) vs. console (Server, Minimal), moving
the code for handling console initial-setup to a helper function
just like the code for gnome-initial-setup and having _console_
wait_login call it when appropriate. We also tweak desktop_vt a
bit because now we need to switch from a console running as test
to a desktop, which breaks the assumption that the highest
numbered session of user test is the desktop...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
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>