gnocchixyz / gnocchi

Timeseries database
Apache License 2.0
298 stars 84 forks source link

unable to build gnocchi in openstack with pyparsing pinned to 3.1.1 #1345

Closed artificial-intelligence closed 8 months ago

artificial-intelligence commented 9 months ago

Before reporting an issue on Gnocchi, please be sure to provide all necessary information.

Which version of Gnocchi are you using

gnocchi==4.6.0

How to reproduce your problem

in openstack kolla, build the container via (this works only with kolla installed from git like this in a venv):

python3 -m pip install 'kolla @ git+https://opendev.org/openstack/kolla@52c441bb6b6bcd9e7c0088f07951b38b67d156a8'
kolla-build --nopush --base debian --base-tag bookworm --namespace gnocchi-base

What is the result that you get

ERROR:kolla.common.utils.gnocchi-base:Collecting daiquiri (from gnocchi==4.6.0)
ERROR:kolla.common.utils.gnocchi-base:Downloading daiquiri-3.2.1-py3-none-any.whl (19 kB)
ERROR:kolla.common.utils.gnocchi-base:INFO: pip is looking at multiple versions of gnocchi[ceph,file,keystone,mysql,s3] to determine which version is compatible with other requirements. This could take a while.
ERROR:kolla.common.utils.gnocchi-base:ERROR: Cannot install gnocchi[ceph,file,keystone,mysql,s3]==4.6.0 because these package versions have conflicting dependencies.

ERROR:kolla.common.utils.gnocchi-base:The conflict is caused by:
    gnocchi[ceph,file,keystone,mysql,s3] 4.6.0 depends on pyparsing<3.1.0 and >=2.2.0
    The user requested (constraint) pyparsing===3.1.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR:kolla.common.utils.gnocchi-base:ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

ERROR:kolla.common.utils.gnocchi-base:Removing intermediate container 69820b03ef37
ERROR:kolla.common.utils.gnocchi-base:Unknown container engine error when building
Traceback (most recent call last):
  File "/home/sven/Dokumente/osism/code/opendev/kolla/.kollatest2/lib/python3.11/site-packages/kolla/image/tasks.py", line 390, in builder
    for stream in self.engine_client.images.build(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sven/Dokumente/osism/code/opendev/kolla/.kollatest2/lib/python3.11/site-packages/docker/models/images.py", line 306, in build
    raise BuildError(chunk['error'], result_stream)
docker.errors.BuildError: The command '/bin/sh -c ln -s gnocchi-base-source/* gnocchi     && python3 -m pip --no-cache-dir install --upgrade -c /requirements/upper-constraints.txt gnocchiclient /gnocchi[keystone,mysql,file,ceph,s3]     && mkdir -p /etc/gnocchi     && chmod 750 /etc/sudoers.d     && chmod 640 /etc/sudoers.d/kolla_gnocchi_sudoers     && touch /usr/local/bin/kolla_gnocchi_extend_start     && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_gnocchi_extend_start' returned a non-zero code: 1

What is result that you expected

gnocchi builds :slightly_smiling_face:

Would it be possible to align the pyparsing package? Or is it not possible? Then I need to file a bug with openstack requirements repo at: https://storyboard.openstack.org/#!/project/openstack/requirements

artificial-intelligence commented 9 months ago

I see the pinning was introduced in https://github.com/gnocchixyz/gnocchi/commit/042db9b91d0e6b6bbb6898fd8172c6f80e82ae6e

investigating upstream issue https://github.com/pyparsing/pyparsing/issues/504 if this can be relaxed now.

artificial-intelligence commented 9 months ago

doesn't look like this was fixed upstream, the maintainer want's to look into it, though.

the problem seems to be that the error messages in pyparsing changed. I don't know how much work it would take to adapt to that.

It doesn't look like pyparsing has a stated contract like semantic versioning to not break apis in patch releases, though.

artificial-intelligence commented 9 months ago

temporary workaround for kolla, marking gnocchi as unbuildable: https://review.opendev.org/c/openstack/kolla/+/897924

tobias-urdin commented 8 months ago

This is now unpinned in master.