The breaking change resulted in workflows that didn't have cached pre-commit environments failing linting at the ansible-lint hook:
Ansible-lint.............................................................Failed
- hook id: ansible-lint
- exit code: 1
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repo40qn8w4j/py_env-python3/bin/ansible-lint", line 8, in <module>
sys.exit(_run_cli_entrypoint())
File "/home/runner/.cache/pre-commit/repo40qn8w4j/py_env-python3/lib/python3.9/site-packages/ansiblelint/__main__.py", line 299, in _run_cli_entrypoint
sys.exit(main(sys.argv))
File "/home/runner/.cache/pre-commit/repo40qn8w4j/py_env-python3/lib/python3.9/site-packages/ansiblelint/__main__.py", line 211, in main
from ansiblelint.generate_docs import rules_as_rich, rules_as_rst, rules_as_str
File "/home/runner/.cache/pre-commit/repo40qn8w4j/py_env-python3/lib/python3.9/site-packages/ansiblelint/generate_docs.py", line 6, in <module>
from rich.console import render_group
ImportError: cannot import name 'render_group' from 'rich.console' (/home/runner/.cache/pre-commit/repo40qn8w4j/py_env-python3/lib/python3.9/site-packages/rich/console.py)
π§ͺ Testing
Automated tests pass. I tested it locally and the freshly built ansible-lint environment ran without issue.
β Pre-approval checklist
[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All relevant type-of-change labels have been added.
π£ Description
This pull request updates the version of ansible-lint used in our pre-commit configuration to the latest release.
π Motivation and context
This change is necessary because ansible-lint has loosely pinned the rich package, and in the v11 release a breaking change was introduced. This was reported in https://github.com/ansible-community/ansible-lint/issues/1795, and the 5.3.2 release included updates for compatibility with rich v11.
The breaking change resulted in workflows that didn't have cached pre-commit environments failing linting at the ansible-lint hook:
π§ͺ Testing
Automated tests pass. I tested it locally and the freshly built ansible-lint environment ran without issue.
β Pre-approval checklist