pep8 jobs failing with ImportError: cannot import name 'render_group' from 'rich.console'

Bug #1956902 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Rabi Mishra

Bug Description

Noticed at https://54ec6a66a32721a868c9-715185bc608cc1ee8bc59b9528031d6b.ssl.cf2.rackcdn.com/823891/2/check/openstack-tox-pep8/0dea119/job-output.txt

2022-01-09 12:29:40.459041 | ubuntu-focal | setting PATH=/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2022-01-09 12:29:40.461527 | ubuntu-focal | [1879] /home/zuul/src/opendev.org/openstack/tripleo-heat-templates$ /home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin/flake8
2022-01-09 12:29:41.329361 | ubuntu-focal | pep8 run-test: commands[5] | ansible-lint -v
2022-01-09 12:29:41.330045 | ubuntu-focal | setting PATH=/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2022-01-09 12:29:41.331520 | ubuntu-focal | [1892] /home/zuul/src/opendev.org/openstack/tripleo-heat-templates$ /home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin/ansible-lint -v
2022-01-09 12:29:42.078682 | ubuntu-focal | INFO Added ANSIBLE_LIBRARY=/home/zuul/.cache/ansible-lint/4940c3/modules
2022-01-09 12:29:42.078765 | ubuntu-focal | INFO Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
2022-01-09 12:29:42.531050 | ubuntu-focal | Traceback (most recent call last):
2022-01-09 12:29:42.531126 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin/ansible-lint", line 8, in <module>
2022-01-09 12:29:42.531134 | ubuntu-focal | sys.exit(_run_cli_entrypoint())
2022-01-09 12:29:42.531157 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/ansiblelint/__main__.py", line 310, in _run_cli_entrypoint
2022-01-09 12:29:42.531169 | ubuntu-focal | sys.exit(main(sys.argv))
2022-01-09 12:29:42.531175 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/ansiblelint/__main__.py", line 214, in main
2022-01-09 12:29:42.531180 | ubuntu-focal | from ansiblelint.generate_docs import rules_as_rich, rules_as_rst, rules_as_str
2022-01-09 12:29:42.531185 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/ansiblelint/generate_docs.py", line 6, in <module>
2022-01-09 12:29:42.531189 | ubuntu-focal | from rich.console import render_group
2022-01-09 12:29:42.531193 | ubuntu-focal | ImportError: cannot import name 'render_group' from 'rich.console' (/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/rich/console.py)
2022-01-09 12:29:42.575222 | ubuntu-focal | ERROR: InvocationError for command /home/zuul/src/opendev.org/openstack/tripleo-h

Revision history for this message
Rabi Mishra (rabi) wrote :
Revision history for this message
Rabi Mishra (rabi) wrote :

https://github.com/ansible-community/ansible-lint/releases/tag/v5.3.2 released with the PR. So we should be good I guess.

Rabi Mishra (rabi)
Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
Juan Badia Payno (jbadiapa) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/824484

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/824484
Committed: https://opendev.org/openstack/tripleo-ansible/commit/60ef62e9f21279a9dbfcdb9e3943e8490f6bbbb3
Submitter: "Zuul (22348)"
Branch: master

commit 60ef62e9f21279a9dbfcdb9e3943e8490f6bbbb3
Author: Juan Badia Payno <email address hidden>
Date: Wed Jan 12 22:09:02 2022 +0100

    Set the ansible-lint version to v5.3.2

    The ansible-lint version used is v5.0.2. This path increases the version
    of the ansible-lint on the .pre-commit-config.yaml

    Related-bug: #1956902
    Change-Id: I36e1327a2cc3c66ef4662b473e0fd03fe97cccf6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/825058

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/victoria)

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/825059

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/825058
Committed: https://opendev.org/openstack/tripleo-ansible/commit/0c3f18d72f2f782bb710f73bdb4cd90ce166944d
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 0c3f18d72f2f782bb710f73bdb4cd90ce166944d
Author: Juan Badia Payno <email address hidden>
Date: Wed Jan 12 22:09:02 2022 +0100

    Set the ansible-lint version to v5.3.2

    The ansible-lint version used is v5.0.2. This path increases the version
    of the ansible-lint on the .pre-commit-config.yaml

    Related-bug: #1956902
    Change-Id: I36e1327a2cc3c66ef4662b473e0fd03fe97cccf6
    (cherry picked from commit 60ef62e9f21279a9dbfcdb9e3943e8490f6bbbb3)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/825059
Committed: https://opendev.org/openstack/tripleo-ansible/commit/549545e78237057ac4285e926f69d9cbc47c8d6a
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 549545e78237057ac4285e926f69d9cbc47c8d6a
Author: Sorin Sbarnea <email address hidden>
Date: Wed Jan 13 17:11:03 2021 +0000

    Set the ansible-lint version to v5.3.2

    The ansible-lint version used is v5.0.2. This path increases the version
    of the ansible-lint on the .pre-commit-config.yaml

    It also includes cherry-pick of https://review.opendev.org/c/openstack/tripleo-ansible/+/779180
    ```
    Upgrade ansible-lint to 5.0

    - remove role name rule as is included in newer versions
    - added .cache folder to git ignore (used by linter)
    - enabled optional yamllint run on ansible-lint
    - assured repository has a valid root requirements.yml (so linter can make use of it)
    - assured that we do not mix playbooks with non playbooks inside same folders
    - renamed undocumented "role" argument received by import_role to official "name".
    - added mocked roles/modules to avoid linter errors (ideally they should be provided by
      requiremetns.yml).
    ```
    requirements.yml is removed from this cherry-pick as it is not needed
    here.

    Use centos8 image to fix following issue
    ```
    file /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release from install of containers-common-2:1-6.module_el8.6.0+954+963caf36.noarch conflicts with file from package redhat-release-8.2-1.0.el8.x86_64
    ```
    Pin to container-tools:3.0 will fix the issue.

    Change-Id: I14b855f8a15afccaf4973e2a612aa7e9eae3bfa5
    (cherry picked from commit af40f9ff8eac8ac7ecb2a29344362afb9db21f95)

    Related-bug: #1956902
    Change-Id: I36e1327a2cc3c66ef4662b473e0fd03fe97cccf6
    (cherry picked from commit 60ef62e9f21279a9dbfcdb9e3943e8490f6bbbb3)
    Signed-off-by: Ananya <email address hidden>
    Co-authored-by: Chandan Kumar (raukadah) <email address hidden>

tags: added: in-stable-victoria
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.