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

Ansible lint latest release generates recommendation multiple times #3854

Closed
justjais opened this issue Oct 19, 2023 · 0 comments · Fixed by #3855
Closed

Ansible lint latest release generates recommendation multiple times #3854

justjais opened this issue Oct 19, 2023 · 0 comments · Fixed by #3855
Assignees
Labels
AAP Ansible Automation Platform bug new Triage required

Comments

@justjais
Copy link

justjais commented Oct 19, 2023

Summary

Ansible lint latest release (6.21.0) generates recommendation multiple times.

Issue Type
  • Bug Report
OS / ENVIRONMENT

mac os

ansible-lint --version

6.21.0

  • ansible installation method: one of source, pip, OS package
  • ansible-lint installation method: one of source, pip, OS package
STEPS TO REPRODUCE

When the ansible-lint runs with write (--fix) enabled it makes recommendation with failures and modified files, and on next ansible-lint run on the same repo content it generates recommendation again, and so on.

And, thus with each new run ansible-lint shows new modified files which is a breaking change.

1st run:

WARNING  The following filters were mocked during the run: network.bgp.health_check_view
Read documentation for instructions on how to ignore specific rule violations.

Modified 3 files.
                     Rule Violation Summary
 count tag                        profile  rule associated tags
     1 jinja[spacing]             basic    formatting (warning)
    15 var-naming[no-role-prefix] basic    idiom
     1 name[casing]               moderate idiom

Failed: 16 failure(s), 1 warning(s) on 46 files. Last profile that met the validation criteria was 'min'.
...

2nd run:

Read documentation for instructions on how to ignore specific rule violations.

Modified 2 files.
                     Rule Violation Summary
 count tag                        profile  rule associated tags
     1 jinja[spacing]             basic    formatting (warning)
    15 var-naming[no-role-prefix] basic    idiom
     1 name[casing]               moderate idiom

Failed: 16 failure(s), 1 warning(s) on 46 files. Last profile that met the validation criteria was 'min'.
...

And, this continues with each new run. Here's the repo link against which I tested the scenario: CloneSandbox.

Default Config file:

---
exclude_paths:
  - .github/
  - .git/
  - .vscode/
  - .devcontainer/
  - changelogs/
  - .cache/
  - .pre-commit-config.yaml


write_list:
  - all

Cmd run: ansible-lint --format md --config-file ansible-lint.yml

Desired Behavior

Ansible-lint should run and show recommendation in one go and share all the modified files in one run itself.

Actual Behavior

Ansible-lint runs and show recommendation but with each new run it shows new recommendations and share new modified files with each new run.

@justjais justjais added bug new Triage required labels Oct 19, 2023
@ssbarnea ssbarnea added the AAP Ansible Automation Platform label Oct 19, 2023
@ssbarnea ssbarnea self-assigned this Oct 19, 2023
ssbarnea added a commit that referenced this issue Oct 19, 2023
@github-project-automation github-project-automation bot moved this from Roadmap to Done in 🧰 devtools project board Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AAP Ansible Automation Platform bug new Triage required
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants