Comment 2 for bug 2004633

Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :

Hello,

The latest affected job is using ansible-lint-6.12.1 [1]. Last good was using ansible-lint-6.11.0.

ansible-6.12.0/.1 was recently released(4 days ago): https://github.com/ansible/ansible-lint/releases. 6.12.0 is affected as well.

I was able to reproduce the issue locally with the latest ansible-lint 6.12.1:

Passes with ansible-lint 6.11.0
~~~
$ ansible-lint --version
ansible-lint 6.11.0 using ansible 2.14.2

A new release of ansible-lint is available: 6.11.0 → 6.12.1
(pep8) [sandeepyadav@localhost tripleo-heat-templates]$ ansible-lint -v
INFO Set ANSIBLE_LIBRARY=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/modules:/home/sandeepyadav/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/collections:/home/sandeepyadav/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/roles:roles:/home/sandeepyadav/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Discovered files to lint using: git -c safe.directory=/tmp/tripleo-heat-templates ls-files --cached --others --exclude-standard -z
INFO Excluded removed files using: git -c safe.directory=/tmp/tripleo-heat-templates ls-files --deleted -z
INFO Executing syntax check on common/deploy-steps-playbooks-common.yaml (0.55s)
WARNING Unable to resolve FQCN for module tripleo_all_nodes_data
~~~

Fails with ansible-lint 6.12.1
~~~
$ python3 -m pip install ansible-lint --upgrade
$ ansible-lint --version
ansible-lint 6.12.1 using ansible 2.14.2

]$ ansible-lint -v
WARNING Ignore loading rule from /tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/rules/galaxy.py due to No module named 'pytest'
INFO Set ANSIBLE_LIBRARY=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/modules:/home/sandeepyadav/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/collections:/home/sandeepyadav/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/home/sandeepyadav/.cache/ansible-compat/a4a0a3/roles:roles:/home/sandeepyadav/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Discovered files to lint using: git -c safe.directory=/tmp/tripleo-heat-templates ls-files --cached --others --exclude-standard -z
INFO Excluded removed files using: git -c safe.directory=/tmp/tripleo-heat-templates ls-files --deleted -z
Traceback (most recent call last):
  File "/tmp/tripleo-heat-templates/.tox/pep8/bin/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/__main__.py", line 349, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/__main__.py", line 244, in main
    result = _get_matches(rules, options)
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/runner.py", line 220, in _get_matches
    lintables = ansiblelint.utils.get_lintables(opts=options, args=options.lintables)
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/utils.py", line 870, in get_lintables
    lintables.append(Lintable(path))
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/file_utils.py", line 245, in __init__
    self._guess_kind()
  File "/tmp/tripleo-heat-templates/.tox/pep8/lib/python3.9/site-packages/ansiblelint/file_utils.py", line 249, in _guess_kind
    if isinstance(self.data, list) and "hosts" in self.data[0]:
IndexError: list index out of range
~~~

[1] https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_f2f/872568/2/check/openstack-tox-pep8/f2f734e/job-output.txt

[2] https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_5fc/868660/2/gate/openstack-tox-pep8/5fc69e9/job-output.txt