Replies: 6 comments 8 replies
-
Ok, let's start the bikeshedding: if we have And for something more tasty:
Are other Copr sources, namely the internal one, out of the scope completely or just something with a very low priority?
Does this cover also packages from
I'd recommend including recommended packages in the list of packages to verify: if they were part of the lock file, the plugin should verify that, if a recommended package is eventually installed, the correct version is installed. If my |
Beta Was this translation helpful? Give feedback.
-
Agreed,
We currently do not support these in Testing Farm, seems there is no use case. I added a note about possible additional artifacts.
Currently, that is undecided, the idea was to create it during the
Yes, you are right, I updated that section, if they are locked, we should check them for the correct version. |
Beta Was this translation helpful? Give feedback.
-
@lukaszachy @psss kindly asking for review |
Beta Was this translation helpful? Give feedback.
-
Thanks much for putting this together! Very nicely written. I believe all the essential steps are covered. Found just two minor typos:
Did you mean
Probably |
Beta Was this translation helpful? Give feedback.
-
@thrix FYI, I'm starting to refactor the "package managers" functionality in #2557. It does not work yet, but it should mature in a week or two at max, hopefully. |
Beta Was this translation helpful? Give feedback.
-
Allow me to add one use-case: As a user, I want to install a kernel from a Koji/Brew or a specific RPM repository. The system should boot into the installed kernel before the test execution. |
Beta Was this translation helpful? Give feedback.
-
Introduction
Due to the multihost changes,
tmt
will be taking over the responsibility of preparing the testing environment fromTesting Farm
.For details about the test environment preparation in Testing Farm see the documentation.
This document is focusing on the
artifact-installation
phase.Note that tmt already supports installation of certain artifacts via the install prepare plugin.
Use Cases
tmt
As a user, I want the ability to perform package installation tests during test execution. I expect the test repositories to be correctly configured to ensure accurate results. However, it is essential that packages are not pre-installed before the test runs to guarantee a clean testing environment.
As a user, I want to install a selected set of packages (e.g. just tmt, no other tmt subpackage), possibly gathered from the
test.require
keys.As a user, I want to be sure that the correct rpm version from the tested artifact (from the requested koji/brew build, copr build) is installed.
As a user, I want all binary rpm packages from the requested artifact to be installed.
As a user, I want to exclude given packages from the installation (e.g. skip some weak dependencies).
As a user, I do want to install the tested rpms during test execution, I just want to have the rpms available in the test environment in a repository.
Testing Farm
As a user, I want to install rpms from a specific RPM repository.
As a user, I want to add a repository file to the testing environment.
As a user, I want to install Brew or Koji builds identified by the build task IDs.
As a user, I want to install Fedora copr builds uniquely identified by
<build-id>:<chroot-name>
.Artifact types
In the initial implementation we will be targeting the following artifacts which are already supported by Testing Farm and tmt.
Supported by tmt
Documented in the
prepare
plugin documentation.rpm files
copr repository
psss/tmt
Supported by Testing Farm
Documented in the Testing Farm API documentation, in the
environments[].artifacts
field.Testing Farm by default downloads all artifacts including the source rpm, except for the
repository-file
artifact and creates a repository calledtest-artifacts
via a post-artifact installation playbookFedora koji builds
43054146
Red Hat brew builds
43924499
Fedora copr builds
<build-id>:<chroot-name>
, e.g.1784470:fedora-32-x86_64
RPM repository
RPM repository file
/etc/yum.repos.d
Testing Farm Artifact Installation Procedure
Battle tested for all supported RHEL and Fedora versions.
A mixture of
downgrade
,reinstall
, andinstall
commands,with a few hacks around weird
dnf
andyum
behavior.See the code in the
implementation details
links for each of the artifact types.Proposed Solution
Create new prepare plugins which will implement the use cases and be compatible with the current
tmt
andTesting Farm
use cases.The installation procedure will be divided into two plugins.
Note that the names of the plugins are subject to discussion.
Plugin
prepare-artifacts
Plugin will use priority
40
.This plugin will take care of gathering all rpms to be installed, and creating a common repository for them.
The plugin will have these steps:
9
, which is higher than the default priority99
.repository-file
artifactThe list of artifacts to be installed will be possible to specify on the command line, or via a yaml file.
The command line functionality can be limited in certain cases.
The configuration file should support all the functionality.
Note that the plugin was renamed from the original name
prepare-repositories
to better reflect its purpose and lower confusion with therepository
artifact type.Plugin
install-artifacts
Plugin will use:
70
forrequired
packages75
forrecommended
packagesThis plugin will take care of the installation of:
prepare-artifacts
pluginThe plugin will have these steps:
Create a list of files to be installed, with locked versions, i.e. lock file
Create a list of packages to be verified
Install packages from the lock file
dnf install
will be sufficient here to cover all the use cases.Verify all packages were installed correctly, check by hash, not by NVR
Testing
We will be creating an extensive test suite to make sure the designed plugins for as expected for all use cases and for all the supported distributions:
Additional Artifacts Support
We might want to support the following artifacts in the future:
Todo
This is a list of todo items with the next steps in this effort.
koji/brew build
artifactrepository and repository file
artifactcopr repository
artifactrpm file
artifactcopr build
artifactBeta Was this translation helpful? Give feedback.
All reactions