Fix dbcounter installation on Jammy
There are two problems with dbcounter installation on Jammy. The first is straightforward. We have to use `py_modules` instead of `modules` to specify the source file. I don't know how this works on other distros but the docs [0] seem to clearly indicate py_modules does this. The second issue is quite an issue and requires story time. When pip/setuptools insteall editable installs (as is done for many of the openstack projects) it creates an easy-install.pth file that tells the python interpreter to add the source dirs of those repos to the python path. Normally these paths are appended to your sys.path. Pip's isolated build env relies on the assumption that these paths are appeneded to the path when it santizes sys.path to create the isolated environemnt. However, when SETUPTOOLS_SYS_PATH_TECHNIQUE is set to rewrite the paths are not appended and are inserted in the middle. This breaks pip's isolated build env which broke dbcounter installations. We fix this by not setting SETUPTOOLS_SYS_PATH_TECHNIQUE to rewrite. Upstream indicates the reason we set this half a decade ago has since been fixed properly. The reason Jammy and nothing else breaks is that python3.10 is the first python version to use pip's isolated build envs by default. I've locally fiddled with a patch to pip [1] to try and fix this behavior even when rewrite is set. I don't plan to push this upstream but it helps to illustrate where the problem lies. If someone else would like to upstream this feel free. Finally this change makes the jammy platform job voting again and adds it to the gate to ensure we don't regress again. [0] https://docs.python.org/3/distutils/sourcedist.html#specifying-the-files-to-distribute [1] https://paste.opendev.org/show/bqVAuhgMtVtfYupZK5J6/ Change-Id: I237f5663b0f8b060f6df130de04e17e2b1695f8a
This commit is contained in:
parent
34c2842676
commit
50e3c06ec2
@ -731,7 +731,6 @@
|
||||
parent: tempest-full-py3
|
||||
description: Ubuntu 22.04 LTS (jammy) platform test
|
||||
nodeset: openstack-single-node-jammy
|
||||
voting: false
|
||||
timeout: 9000
|
||||
vars:
|
||||
configure_swap_size: 4096
|
||||
@ -950,6 +949,7 @@
|
||||
- devstack
|
||||
- devstack-ipv6
|
||||
- devstack-platform-centos-9-stream
|
||||
- devstack-platform-ubuntu-jammy
|
||||
- devstack-enforce-scope
|
||||
- devstack-multinode
|
||||
- devstack-unit-tests
|
||||
|
@ -194,7 +194,6 @@ function pip_install {
|
||||
https_proxy="${https_proxy:-}" \
|
||||
no_proxy="${no_proxy:-}" \
|
||||
PIP_FIND_LINKS=$PIP_FIND_LINKS \
|
||||
SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
|
||||
$cmd_pip $upgrade \
|
||||
$@
|
||||
result=$?
|
||||
|
@ -8,7 +8,7 @@ url = http://github.com/openstack/devstack
|
||||
license = Apache
|
||||
|
||||
[options]
|
||||
modules = dbcounter
|
||||
py_modules = dbcounter
|
||||
entry_points =
|
||||
[sqlalchemy.plugins]
|
||||
dbcounter = dbcounter:LogCursorEventsPlugin
|
||||
|
Loading…
Reference in New Issue
Block a user