Open clebergnu opened 9 months ago
This was driven by autils' requirement for setting up environments such as CentOS Stream 8 which lack Python 3 installed by default.
The alternative solution that will be pursued right now is to allow for the autils module metadata to allow for something like:
supported_platforms:
- CentOS Stream 9
- Fedora 36
- Fedora 37
- CentOS Stream 8
- container_image: path_to_centos_stream_with_python/8
Is your feature request related to a problem? Please describe. In the nrunner architecture, a spawner will manage the execution of a task in a given environment. This environment may be the local machine (as in the
ProcessSpawner
) or a separate (physical or virtual) machine (as in thePodmanSpawner
,LXCSpawner
andRemoteSpawner
).With all of those spawners, it's assumed that Avocado will be able to query the Python version available, so that the correct egg file will be fetched/cached/deployed. This means that Python itself must be present in that environment. But, there are a good number of popular environments which do not have Python available. One that is very important to Avocado is CentOS Stream 8 (and related EL 8 systems).
Note: Currently,
setuptools
is also an Avocado dependency, but work is underway to remove that dependency, so this issue focus solely on bootstrap Python itself for now.Describe the solution you'd like The installation of Python itself should be straightforward in many environments that support packages. A command such as
dnf -y install python38
, for instance, should be enough in a CentOS Stream 8 environment.Thus, the solution I'd like to see is one that adds Python bootstrapping support for some known environments and allows for the caching of such bootstrapping. For instance, in the case of
PodmanSpawner
, there should be a requirement cache entry stating that a given local image already contains the bootstrapped environment.Describe alternatives you've considered The only alternative is really to require the bootstrap to be done in advance, either manually or using other tools (such as the creation/update of containers in CI environments).