[all][gate][stable] Pinning tox<4 in stable branch testing

Ghanshyam Mann gmann at ghanshyammann.com
Fri Jan 6 18:41:43 UTC 2023


 ---- On Fri, 06 Jan 2023 05:42:45 -0800  Brian Rosmaita  wrote --- 
 > Apologies for top posting, but in addition the change gmann has 
 > proposed, I believe that you'll need to change your tox.ini file to pin 
 > tox <4.  I ran into this working on [0] yesterday, where cinderclient 
 > functional tests are devstack-based, and at some point during devstack 
 > install someone [1] pip-installs tox unconstrained.
 > 
 > The zuul ensure_tox role only ensures that tox is present.  The 
 > ensure_tox_version var has a slightly misleading name in that it is only 
 > used when the role decides it needs to install tox, and then it uses the 
 > value of that var; it doesn't ensure that the available tox is that version.
 > 
 > I've verified that the 'requires = tox<4' trick in [0] works when the 
 > tox being called is >=4 [2]; tox creates a virtualenv in .tox/.tox and 
 > installs tox<4 in there, and then runs your testenvs using the tox you 
 > required in your tox.ini.

I saw in the log that it is using the ensure-tox role from devstack/playbooks/tox/run-both.yaml
- https://zuul.opendev.org/t/openstack/build/c957db6323dc4b42bee07f6b709fb3ad/log/job-output.txt#1182

Which is run after pre-yaml where we pinned tox<4 via  ensure_tox_version but missed
doing it in run-both.yaml. Testing it by pinning in run-both.yaml also. run-both

- https://review.opendev.org/c/openstack/python-cinderclient/+/869494

-gmann

 > 
 > cheers,
 > brian
 > 
 > [0] https://review.opendev.org/c/openstack/python-cinderclient/+/869263
 > [1] not naming any names here; also this same situation will happen if 
 > the test node image already contains tox4
 > [2] it works in tox 3 too, sometime after tox 3.18.0.  Hopefully it will 
 > continue to work in tox 4, though they way they're introducing bad 
 > regressions (e.g., [3]), I guess I should say that i've verified that it 
 > works through 4.2.2 (4.2.4 was released yesterday).
 > [3] https://github.com/tox-dev/tox/issues/2811
 > 
 > On 1/4/23 11:08 PM, Ghanshyam Mann wrote:
 > > Hello Everyone,
 > > 
 > > As you might know, tox4 broke almost all the projects tox.ini and so do master as well
 > > as stable branches gate. On the master, we need to fix it as we should use tox4 in testing.
 > > To fix the stable branches gate, either we need to backport all the fixes which include some
 > > more issues fixes[1] or we can pin the tox<4.
 > > 
 > > We discussed it in today's TC meeting and it is better to keep testing the stable branch
 > > with the tox version that they were released with and not with the tox4. Even in future,
 > > there might be the cases where latest tox might introduce more incompatible changes.
 > > By considering all these factors, it is better to pin tox<4 for stable branches (<=stable/zed)
 > > testing.
 > > 
 > > I have prepared the patch to pin it in the common job/template, feel free to comment
 > > with your feedback/opinion:
 > > - https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/867849/3
 > > 
 > > also, tested with nova/cinder stable branches:
 > > - https://review.opendev.org/q/I0ca55abf9975c5a3f9713ac5dd5be39083e04554
 > > - https://review.opendev.org/q/I300e7804a27d08ecd239d1a7faaf2aaf3e07b9ee
 > > 
 > > You can also test it in your project stable branches in case any different syntax in tox.ini
 > > causing the tox upgrade to the latest.
 > > 
 > > [1] https://github.com/tox-dev/tox/issues/2712
 > > 
 > > -gmann
 > > 
 > > 
 > 
 > 
 > 



More information about the openstack-discuss mailing list