kubernetes-sigs/image-builder

All ansible actions should use fully-qualified collection name

mboersma opened this issue · 11 comments

What steps did you take and what happened:

Run make -C images/capi lint and see that there are numerous warnings from ansible-lint that the project is ignoring.

In particular, there are many "FQCN" warnings. It's safer and generally preferable to use the full name of ansible actions–that is, community.windows.win_firewall_rule instead of just win_firewall_rule, for example.

What did you expect to happen:

Running make -C images/capi lint shouldn't result in any fqcn[action] warnings.

Anything else you would like to add:

One way to accomplish this:

ansible-lint --fix=fqcn images/capi/ansible
make -C images/capi lint-ignore
git add images/capi
git commit -m "Ansible actions use fully-qualified collection names"

These commands:

  • Tell the linter to fix this fqcn type of warning automatically
  • Regenerate the .ansible-lint-ignore file so these warnings won't be ignored in the future
  • Add all the changed files to version control and commit them.

Then run make -C images/capi lint to ensure it's passing, and create a PR.

Environment:

N/A

/kind bug
/help
/good-first-issue

@mboersma:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

What steps did you take and what happened:

Run make -C images/capi lint and see that there are numerous warnings from ansible-lint that the project is ignoring.

In particular, there are many "FQCN" warnings. It's safer and generally preferable to use the full name of ansible actions–that is, community.windows.win_firewall_rule instead of just win_firewall_rule, for example.

What did you expect to happen:

Running make -C images/capi lint shouldn't result in any fqcn[action] warnings.

Anything else you would like to add:

One way to accomplish this:

ansible-lint --fix=fqcn images/capi/ansible
make -C images/capi lint-ignore
git add images/capi
git commit -m "Ansible actions use fully-qualified collection names"

Then run make -C images/capi lint to ensure it's passing, and create a PR.

Environment:

N/A

/kind bug
/help
/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Let's try to fix #1313 first, since fixing this will also include those changes and it would be saner to review separately.

Hey @mboersma, I would like to work on this once #1313 is fixed.
/assign

I am new to contributing to opensource. I would like to take this up as my first issue.
/assign

@pranavp2005 I think @khannakshat7 claimed this one first, just fyi.

I think we should wait for #1338 to merge before making this change. Otherwise ansible-lint --fix=fqcn will include several unrelated formatting changes.

@pranavp2005 I think @khannakshat7 claimed this one first, just fyi.

I think we should wait for #1338 to merge before making this change. Otherwise ansible-lint --fix=fqcn will include several unrelated formatting changes.

Okay, thank you for informing me.

@pranavp2005 we haven't heard anything from @khannakshat7 so if you're still available to take this on, please do. Sorry to slow things down.

Here are updated commands that should help to create this PR:

cd images/capi
rm .ansible-lint-ignore
ansible-lint --fix=fqcn ansible
make lint-ignore
git add .
git commit -m "Ansible actions use fully-qualified collection names"

/unassign

Can I work on this issue?

Sure thing! Thank you for offering!

/assign @jongwooo