-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible-lint fails to install from source: AttributeError: 'SpecifierSet' object has no attribute 'split' #590
Comments
this is not true. you can use any "commitish", including SHA |
@webknjaz Almost forgot that. Yep could work. The downside is that Btw, here is one of the failures we got on openstack projects: http://logs.rdoproject.org/58/23158/1/check/tox-linters/e49d829/job-output.txt |
missing successful jobs: [u'periodic-tripleo-ci-centos-7-scenario010-standalone-master'] includes workaround for linters: ansible/ansible-lint#590 Change-Id: Ic1111124acc0119eaf577991e3fb6d4fd8a08915
also encountered this with using
😕 |
@shanedroid Until we get the PRs reviewed, merged and release please use this workaround:
Mainly this is forcing pre-commit to use a version of virtualenv that has an older setuptools, one that is still compatible with ansible-lint. |
This is an ansible lint issue: ansible/ansible-lint#590
* implemented workaround for ansible/ansible-lint#590 * bumped linter versions * added missing proxy variables to passenv * removed uneccesary use of hacking with flake8 hook Change-Id: I3f50f27bf349be6ceb5dc303e206ec83abe3c458
* Update tripleo-ci from branch 'master' - fixed linters * implemented workaround for ansible/ansible-lint#590 * bumped linter versions * added missing proxy variables to passenv * removed uneccesary use of hacking with flake8 hook Change-Id: I3f50f27bf349be6ceb5dc303e206ec83abe3c458
Heya, Also hitting it, it's blocking tripleo-validations repository changes.....
|
According to the setuptools documentation, using tl;dr? Using this for the ansible-lint
Any reason why the setup.py is so complicated/hacky? For handling older versions of setuptools we could manually load the configuration using |
@ekultails I'll tell you more: with the latest Pip and But because of the list of supported envs we cannot rely on the latest versions of runtime pre-requisites. That "hacks" in Regarding "it won't work on RHEL": ideally, users should only install from wheels (or in case of RPMs, users should get pre-built artifacts anyway). This issue only hits cases where users build dist locally. |
AFAIK there is no such thing as a list of supported envs, or if exists is clearly not in this repository. In the absence of an official list I would assume that CI/CD coverage provides that list. Considering that in the last two weeks the CI of the project was broken because of this bug and that any of the two proposed patches is fixing it I would say that at this moment there is no tangible proof that this change breaks more than it fixes. Ansible lint is also a pre-commit hook, and pre-commit is always installing from source. Mainly that is what is broken now. Any user using ansible-lint via pre-commit will encounter this bug. As this seems to take more and more time to get fix, we may even end-up being forced to fork ansible-lint openstack, example https://review.opendev.org/#/c/689719/ |
Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Bug: ansible/ansible-lint#590 Change-Id: I26fa196ff9851106c926ae127491b7e464781836 Signed-off-by: Sorin Sbarnea <[email protected]>
* Update tripleo-ansible from branch 'master' - Workaround for ansible-lint installation failure Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Bug: ansible/ansible-lint#590 Change-Id: I26fa196ff9851106c926ae127491b7e464781836 Signed-off-by: Sorin Sbarnea <[email protected]>
Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Bug: ansible/ansible-lint#590 Change-Id: I26fa196ff9851106c926ae127491b7e464781836 Signed-off-by: Sorin Sbarnea <[email protected]> (cherry picked from commit cffd4fc)
|
I was told that it's the same as Ansible Engine/Core |
While I do understand that the decision to drop the hacks needs to be measured well, I do not understand why the simple fix from #591 was not merged and was delayed.
How long until we get a decision? It would also be great to have some names of those that can make decisions. The reality is CI (azure) is broken on master and I did not see any PRs done from cores in attempt to fix it. Regarding suggestion on #2 : pre-commit by design is installing all hooks using git clone, it cannot do it from wheels (at least not in native way). There is a way to define hooks that install wheels but that would break the ability to auto-update, not to mention that is likely to make execution unpredictable if user forgets to pin wheel version. Mainly I see #2 as a proposal to drop pre-commit support because current codebase no longer installs from source. I personally do not see it acceptable, especially as the issue is not caused by a bug in pre-commit or setuptools, it is solely coming from ansible-lint source code. |
there is a way, it's just a bad idea arguably a good thing happened here, we found out that the packaging of ansible-lint was broken pretty early with shallow clones the amount of stuff saved isn't really impactful |
@asottile the point is that I want to avoid pip building things where possible. If there was a repo with just a config but without |
please read the thread above, this is addressed |
Implement workaround for avoiding installation errors on system with newer setuptools AttributeError: 'SpecifierSet' object has no attribute 'split' Longer term we will have to refactor setup.py which is the root of all evil. Fixes: #590 Signed-off-by: Sorin Sbarnea <[email protected]>
* Bumps ansible-lint to master vesion (which got fix) * Resolves bug with vars file placed inside tasks folder which caused linter to crash parsing them. ansible/ansible-lint#595 * Includes tox.ini fix for HTTP proxies Partial-Bug: #1848512 Partial-Bug: ansible/ansible-lint#590 Partial-Bug: ansible/ansible-lint#595 Change-Id: Ib505b05ef909d0ded9dd87a67166b8f821d62d14
* Update tripleo-quickstart from branch 'master' - Workaround ansible-lint installation failure * Bumps ansible-lint to master vesion (which got fix) * Resolves bug with vars file placed inside tasks folder which caused linter to crash parsing them. ansible/ansible-lint#595 * Includes tox.ini fix for HTTP proxies Partial-Bug: #1848512 Partial-Bug: ansible/ansible-lint#590 Partial-Bug: ansible/ansible-lint#595 Change-Id: Ib505b05ef909d0ded9dd87a67166b8f821d62d14
ansible/ansible-lint#590 was closed.
I just ran into the same error with
Quick-Fix which worked for me:
|
@MartinThoma consider testing alpha pre-release |
We need a workaround for 16.7.3 is not working Reference ansible/ansible-lint#590 Partial-Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Change-Id: I77a31335365b2bbc736a01eea7ef9eaab0a310a5
* Update tripleo-upgrade from branch 'master' - Add ansible-lint pin 16.7.6 is not working We need a workaround for 16.7.3 is not working Reference ansible/ansible-lint#590 Partial-Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Change-Id: I77a31335365b2bbc736a01eea7ef9eaab0a310a5
Workaround for ansible/ansible-lint#590 when trying to install ansible-lint on Travis.
Workaround for ansible/ansible-lint#590 when trying to install ansible-lint on Travis.
Hi @webknjaz, is there an ETA of 4.1.1 release? Thanks! |
It's not my call to make. Ask @awcrosby. |
Install virtualenv==16.3.0 as a workaround for ansible-lint installation issues. See ansible/ansible-lint#590 for reference.
just did some tests and 16.7.5 seems the last version to work with this. |
@dnmvisser To be honest, I am very aware of a bunch of broken virtualenv releases and unless you can reproduce the bug with the latest virtualenv version, I doubt anyone would step in to investigate. |
I'm pretty sure he was installing some old version that had the setup.py shim. |
This is an ansible lint issue: ansible/ansible-lint#590
With the original issue[0] closed the workaround is no longer necessary. At the same time, releasing the dependency constraint allows for updates to some of the older linters employed by the project. * yamllint 1.27.0[1] brings many improvements over 1.18.0 * bashate 1.0.0[2] stable version [0] ansible/ansible-lint#590 [1] https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst#1270-2022-07-08 [2] https://docs.openstack.org/releasenotes/bashate/index.html Signed-off-by: Jiri Podivin <[email protected]> Change-Id: I205d19e63b70cd2256f8c2dae91f90cfe957cf6c
Due to the complex workarounds collected in
setup.py
over the years ansible-lint may fail to install with something like:It happens that I already encountered this error with two other packages I maintain and the fix was to obliterate all workarounds from setup.py and go for safe setup.cfg approach.
References:
This is not fixed until:
The text was updated successfully, but these errors were encountered: