watcher does not have a pyproject.toml

Bug #2109608 reported by sean mooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-watcherclient
Fix Released
Medium
sean mooney
watcher
Fix Released
High
sean mooney
watcher-dashboard
Fix Released
Medium
sean mooney
watcher-tempest-plugin
Fix Released
Medium
sean mooney

Bug Description

for quite a long time deploying a python project without a pyporject.toml
file has been deprecated in setuptools/pip

pip 23.1 removed the "setup.py install" fallback for projects that do
not have pyproject.toml and now uses a pyproject.toml which is vendored
in pip

this does not support pbr or more importnatly our pbr setuptools extention that generates the wsgi script

as a result the jobs are failing with this error

Apr 29 11:16:44.905818 np0040574675 <email address hidden>[83629]: failed to open python file /opt/stack/data/venv/bin/watcher-api-wsgi

Apr 29 11:16:44.905818 np0040574675 <email address hidden>[83629]: unable to load app 0 (mountpoint='') (callable not found or import error)

Apr 29 11:16:44.905818 np0040574675 <email address hidden>[83629]: *** no app loaded. going in full dynamic mode ***

the fix for this is simple

first we need to supprot using the wsgi applciation as a module

https://review.opendev.org/c/openstack/placement/+/919569

then we need to add a pyproject.toml

https://review.opendev.org/c/openstack/placement/+/932399

and finally we need to make devstack use it
https://review.opendev.org/c/openstack/devstack/+/919581/2/lib/placement

unlike placement the devstack plugin is in the repo.

and because we have waited this long to do this we will need to do all 3 changes in one patch.

yesterday the requirements project also drop py39 supprot so we likely need to adapt to that also.

Tags: gate-blocker
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/watcher/+/948438

Changed in watcher:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (stable/2025.1)

Fix proposed to branch: stable/2025.1
Review: https://review.opendev.org/c/openstack/watcher/+/948502

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (stable/2025.1)

Reviewed: https://review.opendev.org/c/openstack/watcher/+/948502
Committed: https://opendev.org/openstack/watcher/commit/8a99d4c5c14e543ef0c35376dfaccbab5535ef91
Submitter: "Zuul (22348)"
Branch: stable/2025.1

commit 8a99d4c5c14e543ef0c35376dfaccbab5535ef91
Author: Sean Mooney <email address hidden>
Date: Tue Apr 29 14:29:11 2025 +0100

    Add support for pyproject.toml and wsgi module paths

    pip 23.1 removed the "setup.py install" fallback for projects that do
    not have pyproject.toml and now uses a pyproject.toml which is vendored
    in pip [1][2]. pip 24.2 has now deprecated a similar fallback to
    "setup.py develop" and plans to fully remove this in pip 25.0 [3][4][5].
    pbr supports editable installs since 6.0.0

    pip 25.1 has now been released and the removal is complete.
    by adding our own minimal pyproject.toml to ensure we are using the
    correct build system.

    This change also requires that we adapt how we generate our wsgi
    entry point. when pyproject.toml is used the wsgi console script is
    not generated in an editbale install such as is used in devstck

    To adress this we need to refactor our usage of our wsgi applciation
    to use a module path instead. This change does not remove
    the declaration of our wsgi_scrtip entry point but it shoudl
    be considered deprecated and it will be removed in the future.

    To unblock the gate the devstack plugin is modifed to to deploy
    using the wsgi module instead of the console script.

    Finally supprot for the mod_wsgi wsgi mode is removed.
    that was deprecated in devstack a few cycle ago and
    support was removed in I8823e98809ed6b66c27dbcf21a00eea68ef403e8

    [1] https://pip.pypa.io/en/stable/news/#v23-1
    [2] https://github.com/pypa/pip/issues/8368
    [3] https://pip.pypa.io/en/stable/news/#v24-2
    [4] https://github.com/pypa/pip/issues/11457
    [5] https://ichard26.github.io/blog/2024/08/whats-new-in-pip-24.2/
    Closes-Bug: #2109608

    Change-Id: Iad77939ab0403c5720c549f96edfc77d2b7d90ee

Revision history for this message
sean mooney (sean-k-mooney) wrote :

dropping importance to high since the gate blocker is now resovled

Changed in watcher:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.opendev.org/c/openstack/watcher/+/948438
Committed: https://opendev.org/openstack/watcher/commit/57b248f9fe7f4701975a71bfe8eab982086b1664
Submitter: "Zuul (22348)"
Branch: master

commit 57b248f9fe7f4701975a71bfe8eab982086b1664
Author: Sean Mooney <email address hidden>
Date: Tue Apr 29 14:29:11 2025 +0100

    Add support for pyproject.toml and wsgi module paths

    pip 23.1 removed the "setup.py install" fallback for projects that do
    not have pyproject.toml and now uses a pyproject.toml which is vendored
    in pip [1][2]. pip 24.2 has now deprecated a similar fallback to
    "setup.py develop" and plans to fully remove this in pip 25.0 [3][4][5].
    pbr supports editable installs since 6.0.0

    pip 25.1 has now been released and the removal is complete.
    by adding our own minimal pyproject.toml to ensure we are using the
    correct build system.

    This change also requires that we adapt how we generate our wsgi
    entry point. when pyproject.toml is used the wsgi console script is
    not generated in an editbale install such as is used in devstck

    To adress this we need to refactor our usage of our wsgi applciation
    to use a module path instead. This change does not remove
    the declaration of our wsgi_scrtip entry point but it shoudl
    be considered deprecated and it will be removed in the future.

    To unblock the gate the devstack plugin is modifed to to deploy
    using the wsgi module instead of the console script.

    Finally supprot for the mod_wsgi wsgi mode is removed.
    that was deprecated in devstack a few cycle ago and
    support was removed in I8823e98809ed6b66c27dbcf21a00eea68ef403e8

    [1] https://pip.pypa.io/en/stable/news/#v23-1
    [2] https://github.com/pypa/pip/issues/8368
    [3] https://pip.pypa.io/en/stable/news/#v24-2
    [4] https://github.com/pypa/pip/issues/11457
    [5] https://ichard26.github.io/blog/2024/08/whats-new-in-pip-24.2/
    Closes-Bug: #2109608

    Depends-on: https://review.opendev.org/c/openstack/watcher/+/948502
    Change-Id: Iad77939ab0403c5720c549f96edfc77d2b7d90ee

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
sean mooney (sean-k-mooney) wrote :
Changed in python-watcherclient:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
sean mooney (sean-k-mooney) wrote :
Changed in watcher-dashboard:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
sean mooney (sean-k-mooney) wrote :
Changed in watcher-tempest-plugin:
importance: Undecided → Medium
status: New → Fix Released
Changed in watcher-dashboard:
status: Fix Committed → Fix Released
Changed in python-watcherclient:
assignee: nobody → sean mooney (sean-k-mooney)
Changed in watcher-dashboard:
assignee: nobody → sean mooney (sean-k-mooney)
Changed in watcher-tempest-plugin:
assignee: nobody → sean mooney (sean-k-mooney)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.