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

Progressive mode doesn't report proper exit code in ansible-lint 6.8.2 #2613

Closed
KamilaBorowska opened this issue Oct 21, 2022 · 0 comments · Fixed by #2638
Closed

Progressive mode doesn't report proper exit code in ansible-lint 6.8.2 #2613

KamilaBorowska opened this issue Oct 21, 2022 · 0 comments · Fixed by #2638
Assignees
Labels

Comments

@KamilaBorowska
Copy link
Contributor

Summary

Progressive mode is broken when there is at least one error. This is a regression introduced in ansible-lint 6.8.2. I think it was introduced by 388d015.

Issue Type
  • Bug Report
Ansible and Ansible Lint details
ansible --version

ansible [core 2.13.5]
  config file = None
  configured module search path = ['/home/xfix/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/xfix/.cache/pypoetry/virtualenvs/ansible-lint-bug-report-M8rP2D-G-py3.10/lib/python3.10/site-packages/ansible
  ansible collection location = /home/xfix/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/xfix/.cache/pypoetry/virtualenvs/ansible-lint-bug-report-M8rP2D-G-py3.10/bin/ansible
  python version = 3.10.7 (main, Sep  5 2022, 13:12:31) [GCC 11.3.0]
  jinja version = 3.1.2
  libyaml = True

ansible-lint --version

ansible-lint 6.8.2 using ansible 2.13.5
  • ansible installation method: pip
  • ansible-lint installation method: pip
OS / ENVIRONMENT

NixOS unstable, Python 3.10, installed using Poetry

[tool.poetry.dependencies]
python = "^3.9"
ansible-lint = "^6.8.2"
ansible = "^6.5.0"
STEPS TO REPRODUCE

Run ansible-lint --progressive in repository that has at least one problem that wasn't introduced in the most recent commit. For an example of such repository, clone https://gist.github.com/ce4dec8ad7192ba9b08502d64e29a0f8.git.

Desired Behavior

--progressive should return 0 status code if no new issues were introduced.

Actual Behavior

I get status code 2 after running ansible-lint --progressive.

$ poetry run ansible-lint --progressive
WARNING  Total violations not increased since previous commit, will mark result as success. (1 -> 0)
WARNING  Marked 1 previously known violation(s) as ignored due to progressive mode.
WARNING  Listing 1 violation(s) marked as ignored, likely already known
yaml[colons]: Too many spaces after colon
blah.yml:1


             Rule Violation Summary              
 count tag          profile rule associated tags 
     1 yaml[colons] basic   formatting, yaml     

Failed after min profile: 1 failure(s), 0 warning(s) on 4 files.
$ echo $?
2
@KamilaBorowska KamilaBorowska added bug new Triage required labels Oct 21, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
@ssbarnea ssbarnea self-assigned this Oct 31, 2022
@ssbarnea ssbarnea removed the new Triage required label Oct 31, 2022
ssbarnea added a commit that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Nov 11, 2022
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