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

Undefined output when hitting unknown-module #4122

Closed
thekad opened this issue Apr 26, 2024 · 0 comments · Fixed by #4133
Closed

Undefined output when hitting unknown-module #4122

thekad opened this issue Apr 26, 2024 · 0 comments · Fixed by #4133
Assignees
Labels

Comments

@thekad
Copy link

thekad commented Apr 26, 2024

Summary

We starting to use ansible-lint on https://github.com/redhatci/ansible-collection-redhatci-ocp repo, however we're hitting a strange issue:

  • Wrong behavior: this run shows only 3 violations when it should be showing thousands
  • Right behavior: like in this other run (will load slowly like I said a ton of issues)

The only difference between the two is a single task in roles/acm_setup/tasks/main.yml ln29 where it goes from k8s_info (wrong) to community.kubernetes.k8s_info (right).

The logs show all the roles appear to be analyzed, but only 3 failures are reported.

For now, I am FQCN the problematic task and moving ahead, I understand this is a very specific corner case.

Issue Type
  • Bug Report
OS / ENVIRONMENT

Installing in a GHA like so:

pip install "ansible-lint[lock] @ git+https://github.com/ansible/ansible-lint@v6"
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/redhatci/ansible-collection-redhatci-ocp/actions/runs/8841230920/job/24278001753#step:4:3).11.9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x6[4](https://github.com/redhatci/ansible-collection-redhatci-ocp/actions/runs/8841230920/job/24278001753#step:4:4)/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x[6](https://github.com/redhatci/ansible-collection-redhatci-ocp/actions/runs/8841230920/job/24278001753#step:4:6)4
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
...
Successfully installed ansible-compat-4.1.11 ansible-core-2.16.2 ansible-lint-6.22.2 attrs-23.2.0 black-23.12.1 bracex-2.4 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.7 cryptography-41.0.7 filelock-3.13.1 idna-3.6 jinja2-3.1.3 jsonschema-4.20.0 jsonschema-specifications-2023.12.1 markdown-it-py-3.0.0 markupsafe-2.1.3 mdurl-0.1.2 mypy-extensions-1.0.0 packaging-23.2 pathspec-0.12.1 platformdirs-4.1.0 pycparser-2.21 pygments-2.17.2 pyyaml-6.0.1 referencing-0.32.1 requests-2.31.0 resolvelib-1.0.1 rich-13.7.0 rpds-py-0.17.1 ruamel.yaml-0.18.5 ruamel.yaml.clib-0.2.8 subprocess-tee-0.4.1 tomli-2.0.1 typing-extensions-4.9.0 urllib3-2.1.0 wcmatch-8.5 yamllint-1.33.0
  • ansible installation method: pip
  • ansible-lint installation method: pip
STEPS TO REPRODUCE

I cannot reproduce this in my laptop even with the same source tree much less with a smaller more manageable playbook, seems only GHA env is affected, once again:

  • Wrong behavior: this run shows only 3 violations when it should be showing thousands
  • Right behavior: like in this other run (will load slowly like I said a ton of issues)
Desired Behavior

ansible-lint shows almost 3 thousand violations

Actual Behavior

ansible-lint reports 3 violations

@thekad thekad added bug new Triage required labels Apr 26, 2024
@ssbarnea ssbarnea self-assigned this May 1, 2024
ssbarnea added a commit that referenced this issue May 2, 2024
ssbarnea added a commit that referenced this issue May 2, 2024
ssbarnea added a commit that referenced this issue May 2, 2024
ssbarnea added a commit that referenced this issue May 2, 2024
ssbarnea added a commit that referenced this issue May 2, 2024
ssbarnea added a commit that referenced this issue May 3, 2024
@ssbarnea ssbarnea removed the new Triage required label May 3, 2024
ssbarnea added a commit that referenced this issue May 5, 2024
This is a notable change in behavior as from now syntax-errors will
no longer prevent the linter from checking other rules in other files.

Fixes: #4122
ssbarnea added a commit that referenced this issue May 6, 2024
This is a notable change in behavior as from now syntax-errors will
no longer prevent the linter from checking other rules in other files.

Fixes: #4122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants