project-config/zuul.d
Ian Wienand 6f1e9fb2b9 translation updates: refactor Python 3.8 workarounds
I think we have quite a tangle of fixes on fixes in the translation
jobs, and I hope this refactor makes things a bit better.

The fundamental problem seems to be that python3.6 can't work with
master requirements.txt.  But we can not move some jobs off bionic
(python 3.6) because of java version contsraints.

The first thing that happened was these jobs got "ensure-python" with
"python_version: 3.8" set to bring in python3.8 on Bionic.  This role
was not bringing in python3.8-venv, so we had no way to create 3.8
virtual environments.  Thus ensure-pip ended up getting modified to
drag this package in (reverted with notes in
372f3af706c796331578ef81c2680e8c4c03c3b6).  This has a fairly easy
solution; let's just make ensure-python bring in the venv packages for
the udpated python -- see dependency
Ie3c03fea82bcec80a897f0905c15f35405a50396.

The git-review install here uses 'ensure_pip_virtualenv_command' to
install git-review in a virtualenv.  git-review still supports bionic,
and does not need to be installed in any speical way.  However, by
overriding the 'ensure_pip_virtualenv_command' for the entire job,
this unrelated install now grew a dependency on python3.8 and created
more confusion over why it was failing.

I believe what we actually want to do on Bionic is just run tox under
python3.8.  So this pulls out all the job-level defintions and
encapsulates them in a single block scoped to run on bionic.  It will
pull in python3.8 packages, and then install tox under python3.8 with
an override of the virtulenv command just for that step.  The jobs
just maintain their node definition and note on why it is required.

The long-term future of these jobs is obviously a question; but I
believe this keeps them running on bionic in as sane a way as possible
for now.

The second part of this is the python3.9 interpreter required on
Focal.  Setting "python_version: 3.9" in the job definition is a bit
confusing, because the job actually requires both Python 3.8 AND 3.9.
This variable is passed to ensure-python, and the naming is a bit
unfortunate because it is so broad (but we can't change that without
zuul-jobs updates).  Here I've pulled out the Python 3.9 install into
a separate focal-gated section in the pre.yaml that explains what is
going on (note that Python 3.8 is just the base python on focal, so
needs no extra installation).  I've also updated the description on
the job node with this info.  There's no need to install the tox
environment any differently on focal; it just uses the base system
python (3.8) which is fine.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/850957
Change-Id: I547e5eb7faabcd9d3983ae85f3291b1a740bc77c
2022-07-27 07:48:43 +10:00
..
jobs.yaml translation updates: refactor Python 3.8 workarounds 2022-07-27 07:48:43 +10:00
pipelines.yaml Move the daily periodic trigger earlier 2021-10-20 16:34:16 +02:00
projects.yaml Remove publish-service-types-authority dependency 2022-07-14 10:00:49 +10:00
secrets.yaml pypi: use API token for upload 2022-07-14 09:53:18 +10:00
starlingx-jobs.yaml Update StarlingX docs promote job for R6 release 2022-01-27 16:30:03 -05:00