Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CI image build hacks #1429

Merged
merged 1 commit into from
Nov 3, 2024
Merged

Conversation

Callum027
Copy link
Contributor

@Callum027 Callum027 commented Oct 23, 2024

Fix CI image build issues that made certain hacks necessary for things to work, and remove hacks that are no longer required with the new Ubuntu 24.04-based CI image.

  • Use the Ubuntu-packaged version of Tox, Setuptools and and all other packages installed outside of the test environment. This is necessary to make dependency conflicts less likely due to setting sitepackages to True in Tox to pass through python3-rados to the test environment.
  • Remove the hack for deleting the distro-managed version of pyparsing, as the new version available in Ubuntu 24.04 is compatible.
  • Remove the hack for deleting the distro-packaged versions of the jaraco.* series of packages. The reason why this started causing problems is Setuptools v71.0 onwards changed behaviour to preferring external dependencies instead of the bundled versions if they are installed, even if they are not compatible. The ceph-mgr package installs the distro-managed version of jaraco.text (among others), causing the conflict.
  • Remove the patch for the distro-managed version of werkzeug, as the new version now adds the line for deferred annotation validation.
  • Don't set VIRTUALENV_SETUPTOOLS=bundle explicitly, as this is the default behaviour in virtualenvs created by Tox. setuptools was (and is) actually being installed, it was just erroring out on import due to the incompatible version of jaraco.text being found. pip's error handling was hiding the real cause of the failure.

@Callum027
Copy link
Contributor Author

Our internal CI testing pipeline using a similar build image to what the public Gnocchi pipeline uses revealed the root cause of some of the problems that required hacks to be applied to work around.

I've now made a draft PR to address them upstream.

@Callum027 Callum027 force-pushed the remove-ci-hacks branch 4 times, most recently from 7099350 to 10674e3 Compare October 23, 2024 05:00
Fix CI image build issues that made certain hacks necessary
for things to work, and remove hacks that are no longer required
with the new Ubuntu 24.04-based CI image.

* Use the Ubuntu-packaged version of Tox, Setuptools and
  and all other packages installed outside of the test environment.
  This is necessary to make dependency conflicts less likely
  due to setting `sitepackages` to `True` in Tox to pass through
  `python3-rados` to the test environment.
* Remove the hack for deleting the distro-managed version of `pyparsing`,
  as the new version available in Ubuntu 24.04 is compatible.
* Remove the hack for deleting the distro-packaged versions of
  the `jaraco.*` series of packages. The reason why this started
  causing problems is [Setuptools v71.0](https://setuptools.pypa.io/en/latest/history.html#v71-0-0)
  onwards changed behaviour to preferring external dependencies instead
  of the bundled versions if they are installed, even if they are not compatible.
  The `ceph-mgr` package installs the distro-managed version of `jaraco.text`
  (among others), causing the conflict.
* Remove the patch for the distro-managed version of `werkzeug`,
  as the new version now adds the line for deferred annotation validation.
* Don't set `VIRTUALENV_SETUPTOOLS=bundle` explicitly,
  as this is the default behaviour in virtualenvs created by Tox.
  `setuptools` was (and is) actually being installed, it was just
  erroring out on import due to the incompatible version of `jaraco.text`
  being found. `pip`'s error handling was hiding the real cause
  of the failure.
@Callum027 Callum027 marked this pull request as ready for review October 23, 2024 05:19
@chungg chungg merged commit 5cc26b8 into gnocchixyz:master Nov 3, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants