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

All ansible actions should use fully-qualified collection name #1312

Closed
mboersma opened this issue Sep 27, 2023 · 11 comments · Fixed by #1404
Closed

All ansible actions should use fully-qualified collection name #1312

mboersma opened this issue Sep 27, 2023 · 11 comments · Fixed by #1404
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@mboersma
Copy link
Contributor

mboersma commented Sep 27, 2023

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

@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Sep 27, 2023
@mboersma
Copy link
Contributor Author

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

@khannakshat7
Copy link

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

@pranavp2005
Copy link

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

@mboersma
Copy link
Contributor Author

mboersma commented Nov 6, 2023

@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
Copy link

@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.

@mboersma
Copy link
Contributor Author

@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.

@mboersma
Copy link
Contributor Author

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"

@mboersma
Copy link
Contributor Author

/unassign

@jongwooo
Copy link
Member

Can I work on this issue?

@AverageMarcus
Copy link
Member

Sure thing! Thank you for offering!

/assign @jongwooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants