-
Notifications
You must be signed in to change notification settings - Fork 671
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
Do not remove blank lines when building profile playbook #9809
Conversation
@jan-cerny @matejak Do you remember why the removal of blank lines was introduced? Is there any risk when we don't remove them? |
@mildas I don't know exactly. I have found that this was introduced by #3688 and I dig in the history that there were multiple similar PRs at that time: #3687, #3685, #3684 etc. They are all related to Ansible roles, Ansible lint and Ansible Galaxy. My theory is that the blank lines cause some warning when the generated roles were uploaded in Ansible Galaxy. But, we have a CI job here that builds the Ansible Roles and runs the Ansible Lint and its still green. What do you think about this CI job? Side note: I discovered that this is the only call of the remove_multiple_blank_lines function so if we will remove it we can also remove the function. |
There could be warning for multiple blank lines between Ansible tasks or between task parameters. But multiple blank lines in multi-line string shouldn't be a problem in my opinion as users might need to have such content there.
The job looks useful to me and it doesn't skip any warning related to blank lines.
Great catch! I've removed it in last commit |
Code Climate has analyzed commit edcae7c and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 0.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 47.2% (0.0% change). View more on Code Climate. |
The CI fail in Fedora rawhide is unrelated to this PR, it's caused by libxml2 ABI break, see https://bugzilla.redhat.com/show_bug.cgi?id=2139546 |
Description:
Removal of blank lines breaks remediations when working with exact string.
For example audit_ospp_general rule
Rationale:
Fixes #9808
Fixes CS8 Testing farm https://artifacts.dev.testing-farm.io/3c424748-3e5f-42a7-b147-b8ac92e4fc0d/work-ansible-osppnCOL9l/tests/fmf-plans/ansible-ospp/execute/data/Sanity/ansible-machine-hardening/ospp/output.txt