Skip to content
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

prerelease version of ansible-lint is getting installed #2646

Closed
mafalb opened this issue Apr 10, 2020 · 3 comments
Closed

prerelease version of ansible-lint is getting installed #2646

mafalb opened this issue Apr 10, 2020 · 3 comments

Comments

@mafalb
Copy link

mafalb commented Apr 10, 2020

Issue Type

  • Bug report

Prelelease version of ansible-lint breaks new molecule installs

A prerelease version o# ansible-lint -v
Usage: ansible-lint [options] [playbook.yml [playbook2 ...]]|roledirectoryf ansible-lint was released
https://pypi.org/project/ansible-lint/4.3.0a0/

$ pip install molecule[lint] is installing that prerelease because of

ansible-lint >= 4.1.1a2, < 5 in setup.cfg

because of that pip is concluding that a prerelease version of ansible-lint is OK.
But: there is a bug in ansible-lint 4.3.0a0 which is breaking CI
ansible/ansible-lint#731

Much of my CI is broken.

Please use stable dependencies in stable molecule versions.

Molecule and Ansible details

$ ansible --version
ansible 2.9.6
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /molecule/lib/python3.6/site-packages/ansible
  executable location = /molecule/bin/ansible
  python version = 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]
$ molecule --version
molecule 3.0.3
   ansible==2.9.6 python==3.6
$ ansible-lint --version
ansible-lint 4.3.0a0

Molecule installation method (one of):

  • pip

Ansible installation method (one of):

  • pip

Detail any linters or test runners used:

  • ansible-lint

Desired Behavior

$ pip install molecule[lint] installs stable version of ansible-lint, running it without playbook or role as argument does not give usage message, e.g.

$ ansible-lint -v
Unknown file type: .github/workflows/CI.yml
Unknown file type: galaxy.yml
Unknown file type: roles/plugin/tasks/main.yml
Found roles: roles/plugin
Found playbooks: molecule/default/converge.yml molecule/default/verify.yml molecule/install_molecule.yml molecule/requirements.yml
Examining molecule/default/converge.yml of type playbook
Examining molecule/default/verify.yml of type playbook
Examining molecule/install_molecule.yml of type playbook
Examining molecule/requirements.yml of type playbook
Examining roles/plugin/tasks/main.yml of type tasks

Actual Behaviour

$ pip install molecule[lint] installs prerelease version of ansible-lint

$ ansible-lint -v
Usage: ansible-lint [options] [playbook.yml [playbook2 ...]]|roledirectory
@mafalb mafalb added the bug label Apr 10, 2020
@ssbarnea
Copy link
Member

@mafalb That sounds like pip behavior change because last time I checked using pre-release version as minimal version request did not enforce installation of another pre-release. Still, it will be very easy for your to make a PR that chages condition to >=4.0.0 and I will be happy to merge it.

@mafalb
Copy link
Author

mafalb commented Apr 26, 2020

I did some search on that pre-release behavior, see the links below.

pypa/pip#7579
especially
pypa/pip#7579 (comment)

or
pypa/pip#4969 (comment)

However, I do not get that behaviour on all installations but I am not sure under exactly what conditions, it could be that it's only with python 3 (on a molecule install with python 2 on CentOS for instance I got ansible-lint 4.2.0, not the pre-release).

p.s. i saw you already changed it in 2513fab

@ssbarnea
Copy link
Member

I am going to close this because there is nothing actionable about it. We will continue to use pre-release as long the linter does not move to a faster release cycle.

Also keep in mind that the stability of a pre-release varies a lot from one project to another. Mainly is better to use a working pre-release than a broken release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants