-
Notifications
You must be signed in to change notification settings - Fork 660
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
Output "Passed with <> profile" is broken #2735
Comments
From what I gather the issue resides at https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/app.py#L293 I'd argue that there are issues both when we pass and fail. It is more confusing that other profiles are mentioned, I'd argue that when specifying profile x we don't care if we fail on a subset of profile x but rather if we actually fail on profile x. Since the profile y is a subset of x it is more confusing to mention profile y instead of just outputting "Failed with profile x". You're still presented with the faults and the profile they belong to which would be enough to signify to the user which subset of the chosen profile that failed. The problem is that if you provide say production profile and fail on a rule specified in the min profile your output will be that you fail with min profile instead. The desired output would be the profile specified, since for example the production profile includes the min profile. For the case of a successful run the output will always be production profile, it does not matter what the user sets --profile to. To verify one has to enable debug logs to verify that the specified profile is actually loaded. This is super intuitive and leads to a lot of confusion. Since @dbk-rabel already showed steps to reproduce the second case described I'll add the first case I described above. Ansible and Ansible Lint details
OS / ENVIRONMENT Ubuntu 20.04.5 LTS x86_64 STEPS TO REPRODUCE / ACTUAL BEHAVIOR
DESIRED BEHAVIOR
|
I might be able to allocate time to this if this isn't prioritized. Please confirm that I'm not the only one who believes that both success/fail messages are an issue. |
Thanks for the explaination! At least in my opinion you are right and the messages should be changed. But I might be biased. ;) |
I tend to agree, it should simply reflect the profile tested against. We could also add a "last profile passed" if anyone thinks that would be valuable |
Summary
ansible-lint shows a message "Passed with ... profile". But the given profile seems to never be the one, that we used to test.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
RHEL 8
STEPS TO REPRODUCE
Desired Behavior
Show the correct profile:
Actual Behavior
Show the wrong profile:
The text was updated successfully, but these errors were encountered: