ansible-lint broken when called from pre-commit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Critical
|
Sorin Sbarnea |
Bug Description
All jobs using ansible-lint via pre-commit (aka tox-molecule-
The bug itself is not caused by setuptools but by the ugly-hack present inside setup.py from the ansible-lint project.
I already proposed the PR to fix it but projects maintenance status is not one of the best right now, it may take more time to get it merged and a new release made.
Meanwhile I was able to find a workaround that looks like:
https:/
Fixes need to be done in all repositories where we encounter them.
Upstream references:
* https:/
There are already two PRs that are fixing the issue but they were not reviewed/
* https:/
I will mark this as a promotion blocker because is high-likely that most CR would be blocked by the broken linters jobs until we implement workarounds everywhere.
Temporary workarounds:
deps =
# workaround for https:/
virtualenv=
pre-commit
By pinning the virtualenv on tox.ini we can avoid this breakage, that is because newer virtualenv bring a newer setuptools, one that is not compatible with the dirty hacks made in setup.py of ansible-lint.
tags: | added: alert |
description: | updated |
description: | updated |
Changed in tripleo: | |
status: | Triaged → In Progress |
Changed in tripleo: | |
status: | In Progress → Fix Released |
Apparently the workaround above does work only for some cases and not for all of them.
Pinged #ansible-devel team daily since last week to review my two possible bugfixes but still without tangible results.
Meanwhile I ended up creating fork of ansible-lint with the patch on it and got the confirmation that this works for us.
This could be used as a temporary workaround: /review. opendev. org/#/c/ 689719/ 3/.pre- commit- config. yaml
https:/