Ubuntu Noble: flake8 AttributeError: 'EntryPoints' object has no attribute 'get'

Bug #2088356 reported by Ghanshyam Mann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Undecided
Ghanshyam Mann
Blazar
Fix Released
Undecided
Ghanshyam Mann
python-cinderclient
Fix Released
Undecided
Unassigned
tacker
Fix Released
Undecided
Ghanshyam Mann
zaqar
Fix Released
Undecided
Takashi Kajinami

Bug Description

As per OpenStack 2025.1 testing runtime[1], we need to migrate all project testing on Ubuntu Noble.

But pep8 job on Noble fail with the below error:
- https://zuul.opendev.org/t/openstack/build/b90fb84613b547f09e67071733119ea2

Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "/home/zuul/src/opendev.org/openstack/tacker/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'
pep8: 4880 C exit 1 (0.17 seconds) /home/zuul/src/opendev.org/openstack/tacker> flake8 pid=5838 [tox/execute/api.py:286]

[1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

This basically hitting this issue - https://github.com/python/importlib_metadata/issues/406

To solve this, you can upgrade the flake8. That can be done when you use the latest hacking (7.0.0.) which use latest flake8 7.1.1. With this you might need to fix a few more pep8 error which is again a good thing to do.

https://review.opendev.org/c/openstack/tacker/+/935421

Changed in tacker:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Changed in barbican:
status: New → In Progress
tags: added: migrate-to-noble
description: updated
Changed in barbican:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Changed in blazar:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Changed in zaqar:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Changed in tacker:
status: New → In Progress
Revision history for this message
Takashi Kajinami (kajinamit) wrote :
Changed in zaqar:
assignee: Ghanshyam Mann (ghanshyammann) → Takashi Kajinami (kajinamit)
Changed in barbican:
assignee: Ghanshyam Mann (ghanshyammann) → Takashi Kajinami (kajinamit)
status: In Progress → Fix Released
Changed in zaqar:
status: New → Fix Released
Revision history for this message
Takashi Kajinami (kajinamit) wrote :
Revision history for this message
Takashi Kajinami (kajinamit) wrote :
Changed in blazar:
status: New → Fix Released
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :
Changed in blazar:
status: Fix Released → In Progress
Changed in barbican:
assignee: Takashi Kajinami (kajinamit) → Ghanshyam Mann (ghanshyammann)
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Ahh, yes. We have to bump hacking in tempest plugin, too.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/barbican-tempest-plugin/+/932946
Committed: https://opendev.org/openstack/barbican-tempest-plugin/commit/c6da0009810199f755c2bc69bffcd615975e118e
Submitter: "Zuul (22348)"
Branch: master

commit c6da0009810199f755c2bc69bffcd615975e118e
Author: Ghanshyam Mann <email address hidden>
Date: Mon Nov 11 19:23:05 2024 -0800

    Update gate jobs as per the 2025.1 cycle testing runtime

    As per 2025.1 testing runtime[1], we need to test on Ubuntu
    Noble (which will be taken care by depends-on tempest and devstack
    patches to move base jobs to Noble) and at least single job to run on
    Ubuntu Jammy (for smooth upgrade from previous releases).

    This commit adds a new job to run on Jammy which can be removed
    in future cycle when testing runtime test next version of Ubuntu
    as default.

    Closes-Bug: #2088356

    Depends-On: https://review.opendev.org/c/openstack/tempest/+/932156

    [1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html

    Change-Id: I86b6abfdbd06851f6d1b331ce113e0897384bd28

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to blazar-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/blazar-tempest-plugin/+/932947
Committed: https://opendev.org/openstack/blazar-tempest-plugin/commit/fd663b307d6df0b6213898aa1a48cf314d8bdd7a
Submitter: "Zuul (22348)"
Branch: master

commit fd663b307d6df0b6213898aa1a48cf314d8bdd7a
Author: Ghanshyam Mann <email address hidden>
Date: Mon Oct 21 18:29:20 2024 -0700

    Update gate jobs as per the 2025.1 cycle testing runtime

    As per 2025.1 testing runtime[1], we need to test on Ubuntu
    Noble (which will be taken care by depends-on tempest and devstack
    patches to move base jobs to Noble) and at least single job to run on
    Ubuntu Jammy (for smooth upgrade from previous releases).

    This commit adds a new job to run on Jammy which can be removed
    in the next cycle.

    Also bump the hacking version to fix the pep8 erorr:
     -AttributeError: 'EntryPoints' object has no attribute 'get'

    Closes-Bug: #2088356

    Depends-On: https://review.opendev.org/c/openstack/tempest/+/932156

    [1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html

    Change-Id: Ib4e2c089e7cd4ebb5aaccb9a747aaffe1618a5fa

Changed in blazar:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/936424
Committed: https://opendev.org/openstack/tacker/commit/068909080a35e922301a8a0f5081f79d8013062b
Submitter: "Zuul (22348)"
Branch: master

commit 068909080a35e922301a8a0f5081f79d8013062b
Author: Ai Hamano <email address hidden>
Date: Thu Nov 28 15:05:48 2024 +0900

    Fix for netaddr v1.3.0 upgrade and pep8 error

    It is necessary to specify "expand_partial=True" in IPNetwork init
    to expand partial addresses from netaddr v1.3.0.
    This patch fixes it so that "expand_partial" can be specified
    in IPNetwork init.

    And bump the hacking version to 7.0.0 and fix the pep8
    error:
     - AttributeError: 'EntryPoints' object has no attribute 'get'

    Closes-Bug: #2089815
    Closes-Bug: #2088356
    Change-Id: I2deb71242f555bbae5ee7c798add18490cb38344

Changed in tacker:
status: In Progress → Fix Released
Changed in python-cinderclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-cinderclient/+/935586
Committed: https://opendev.org/openstack/python-cinderclient/commit/31204545085b6767af2b01daa0ec0633b38cf83d
Submitter: "Zuul (22348)"
Branch: master

commit 31204545085b6767af2b01daa0ec0633b38cf83d
Author: Ghanshyam Mann <email address hidden>
Date: Wed Dec 11 19:53:45 2024 -0800

    Fix the pep8 error on Noble

    pep8 job failing on Noble with below error.
    Bumping the hacking version to 7.0.0 to fix it

         - AttributeError: 'EntryPoints' object has no attribute 'get'

    Closes-Bug: #2088356

    Change-Id: Ib168ad6842dfcf5cac8a85db973e339d2225b444

Changed in python-cinderclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/935421
Committed: https://opendev.org/openstack/tacker/commit/e5eae71cff44168d188a48f0c420d330b9a98252
Submitter: "Zuul (22348)"
Branch: master

commit e5eae71cff44168d188a48f0c420d330b9a98252
Author: Ghanshyam Mann <email address hidden>
Date: Thu Dec 5 12:37:05 2024 -0800

    Update gate jobs as per the 2025.1 cycle testing runtime

    As per 2025.1 testing runtime[1], we need to test on Ubuntu
    Noble (which will be taken care by depends-on tempest and devstack
    patches to move base jobs to Noble) and at least single job
    (tacker-ft-v2-terraform) to run on Ubutnu Jammy (for smooth upgrade
    from previous releases).

    Tacker k8s jobs are failing due to the below bug which need fix on
    devstack-plugin-container so keeping those running on Jammy until
    issue is fixed in devstack-plugin-container side.

    - https://bugs.launchpad.net/tacker/+bug/2090859

    Closes-Bug: #2088356
    Related-Bug: #2090859

    Tracking: https://etherpad.opendev.org/p/migrate-to-noble

    [1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html

    Change-Id: I8adf3b2ca0ec9858c83a05702aa257193960cc4c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tackerclient 2.3.0

This issue was fixed in the openstack/python-tackerclient 2.3.0 Epoxy release.

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.