horizon does not support setuptools 67.3.1

Bug #2007574 reported by Michal Nasiadka
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
New
Undecided
Unassigned

Bug Description

Recently setuptools 67.3.1 has been released, and it broke Kolla Horizon container builds.
It seems that xstatic libraries rely on setuptools importing pkg_resources during build, which does not work in latest setuptools [1].

[1]: https://github.com/pypa/setuptools/issues/3824

Revision history for this message
Satish Patel (satish-txt) wrote :

I'm having similar issue with ubuntu/zed release. What is the workaround and fix here?

Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :

Hi, Could you add some information on how can I reproduce this issue in my local env.?
I followed the steps you mention in [1], but it is working fine for me with setuptools v 67.6.1

[1] https://github.com/pypa/setuptools/issues/3824#issuecomment-1431137591

Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :

This error will happen in the below Xstatic packages:

XStatic-Angular-FileUpload>=12.0.4.0 # MIT License
XStatic-Angular-lrdragndrop>=1.0.2.2 # MIT License
XStatic-Angular-Schema-Form>=0.8.13.0 # MIT
XStatic-Bootstrap-Datepicker>=1.3.1.0 # Apache 2.0 License
XStatic-Hogan>=2.0.0.2 # Apache 2.0 License
XStatic-Jasmine>=2.4.1.1 # MIT License
XStatic-jQuery>=1.12.4.1,<2 # MIT License
XStatic-JQuery-Migrate>=1.2.1.1 # MIT License
XStatic-JQuery.quicksearch>=2.0.3.1 # MIT License
XStatic-JQuery.TableSorter>=2.14.5.1 # MIT License
XStatic-jquery-ui>=1.12.1.1 # MIT License
XStatic-objectpath>=1.2.1.0 # MIT
XStatic-Rickshaw>=1.5.0.0 # BSD License (prior)
XStatic-Spin>=1.2.5.2 # MIT License
XStatic-term.js>=0.0.7.0 # MIT License

Revision history for this message
Michal Nasiadka (mnasiadka) wrote :

Yes, forgot to add in the report that it's about Static packages.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/883051

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/883051
Committed: https://opendev.org/openstack/horizon/commit/a13e01bc462718df5c52d460b489131eaaca5735
Submitter: "Zuul (22348)"
Branch: master

commit a13e01bc462718df5c52d460b489131eaaca5735
Author: manchandavishal <email address hidden>
Date: Fri May 12 11:25:57 2023 +0530

    Bump XStatic package version to latest i.e. 1.0.3

    horizon does not support setuptools 67.3.1 and it broke Kolla
    Horizon container builds. We recently cut a new release of Xstatic
    [1] which may fix this setuptools issue. So this patch bump the
    Xstatic version to 1.0.3 to fix setuptools issue. XStatic package
    version is also bumped in openstack/requirements[2].

    [1] https://github.com/xstatic-py/xstatic/commit/5cd7a2347046b71056ae29f00ffa4f71218a5c0c
    [2] https://review.opendev.org/c/openstack/requirements/+/882916
    Related-Bug: #2007574

    Change-Id: I0c463d205d4534f7b0cfcab00bec4b98cd429ae1

Revision history for this message
Michal Nasiadka (mnasiadka) wrote :

Tried that again - this time we get this error:
https://5173a9504b4112de0add-33dcd8a3e46b9742c8c437a07c900baf.ssl.cf1.rackcdn.com/901828/4/check/kolla-build-debian/8a80613/kolla/build/000_FAILED_horizon.log

ERROR:kolla.common.utils.horizon: error: subprocess-exited-with-error

  Ã— python setup.py egg_info did not run successfully.
  â”‚ exit code: 1
  â•°â”€> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-wrdegf5x/xstatic-moment-timezone_03783ea7bf8341cfb07a8be86d1656d8/setup.py", line 2, in <module>
          from xstatic.pkg import moment_timezone as xs
      ImportError: cannot import name 'moment_timezone' from 'xstatic.pkg' (unknown location)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.

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.