openstack-tox-linters fails (tripleo-ci) ImportError: cannot import name '_unicodefun' from 'click'

Bug #1966879 reported by Marios Andreou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Marios Andreou

Bug Description

At [1][2][3] the openstack-tox-linters is failing in the tripleo-ci repo (gate blocker) with trace like:

 2022-03-29 07:49:45.391211 | ubuntu-focal | Traceback (most recent call last):
 2022-03-29 07:49:45.391222 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repou2cneckc/py_env-python3/bin/black", line 8, in <module>
 2022-03-29 07:49:45.391234 | ubuntu-focal | sys.exit(patched_main())
 2022-03-29 07:49:45.391246 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repou2cneckc/py_env-python3/lib/python3.8/site-packages/black/__init__.py", line 6606, in patched_main
 2022-03-29 07:49:45.391274 | ubuntu-focal | patch_click()
 2022-03-29 07:49:45.391292 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repou2cneckc/py_env-python3/lib/python3.8/site-packages/black/__init__.py", line 6595, in patch_click
 2022-03-29 07:49:45.391306 | ubuntu-focal | from click import _unicodefun # type: ignore
 2022-03-29 07:49:45.391317 | ubuntu-focal | ImportError: cannot import name '_unicodefun' from 'click' (/home/zuul/.cache/pre-commit/repou2cneckc/py_env-python3/lib/python3.8/site-packages/click/__init__.py)

The issue is reported upstream at [4] - a new release of click has broken the black linter test. We need to pin click to earlier version

[1] https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_989/835101/3/check/openstack-tox-linters/98965c1/job-output.txt
[2] https://aae15366fccb3e5d9342-63681721353a54dab1064b012b97b3cb.ssl.cf5.rackcdn.com/835541/1/check/openstack-tox-linters/09dc14a/job-output.txt
[3] https://26ac4362fb28c9ae1745-4bfcd1a0cc7c3d4f9c4976468d7d6805.ssl.cf5.rackcdn.com/835536/1/check/openstack-tox-linters/0c94b10/job-output.txt
[4] https://github.com/psf/black/issues/2964

Revision history for this message
Marios Andreou (marios-b) wrote :
Changed in tripleo:
assignee: nobody → Marios Andreou (marios-b)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ci (master)

Change abandoned by "Ronelle Landy <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci/+/835547

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ci/+/835547
Committed: https://opendev.org/openstack/tripleo-ci/commit/9ff3056e853628d57ec271e7b9246133522ed8fe
Submitter: "Zuul (22348)"
Branch: master

commit 9ff3056e853628d57ec271e7b9246133522ed8fe
Author: Marios Andreou <email address hidden>
Date: Tue Mar 29 10:54:09 2022 +0300

    Bump black to 22.3.0 to fix deps issue (click)

    As described in related-bug new release of click
    broke the openstack-tox-linters job. Bumping to
    latest version of black fixes it.

    Also adds irrelevant files
    to layout to address freeze issue seen at [1]

    [1] https://review.opendev.org/c/openstack/tripleo-ci/+/835547/4#message-f3307ccba64ac124fe6ef497c151e66f5731a0e1
    Related-Bug: 1966879

    Change-Id: I62d101a1fa6c55d047bb328565cfec443e2e496f

Revision history for this message
Marios Andreou (marios-b) wrote :

moving fix-released should be done here now

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ci-health-queries (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ansible-role-collect-logs (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ansible-role-collect-logs (master)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-collect-logs/+/835814
Committed: https://opendev.org/openstack/ansible-role-collect-logs/commit/24cecbfb5daaff05e6e3713e0e53cac3054a4dfe
Submitter: "Zuul (22348)"
Branch: master

commit 24cecbfb5daaff05e6e3713e0e53cac3054a4dfe
Author: Jiri Podivin <email address hidden>
Date: Wed Mar 30 12:07:28 2022 +0200

    Bumping black to 22.3.0

    Setting desired version of black to 22.3.0 prevents issues with
    the click dependency described in the #1966879.

    Also modifies the docs/source/conf.py file to comply with
    linting rules.

    Related-Bug: #1966879

    Signed-off-by: Jiri Podivin <email address hidden>
    Change-Id: Icb5cc90d33ffdcb15e1870e424981d435683c77c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ci-health-queries (master)

Change abandoned by "Jiri Podivin <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ci-health-queries/+/835813
Reason: Patch is no longer necessary, as the version bump was introduced in Iccd719e41e7328d404b1ee53b7e3bd0cef4d0c84

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.