-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add check for non-inclusive language #142
Conversation
Note: If 38a2f3a is acceptable, we can use the action woke-action with the released woke. |
[citest] |
.github/workflows/woke.yml
Outdated
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/checkout@v2 | |
uses: actions/checkout@v3 |
424d0d9
to
3cd37a6
Compare
[citest] |
tests/tasks/setup_ipa.yml
Outdated
@@ -12,6 +12,7 @@ | |||
- name: Clone ansible-freeipa repo | |||
git: | |||
repo: https://github.com/freeipa/ansible-freeipa | |||
# wokeignore:rule=master | |||
version: master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can omit version: master
- by default it will grab whatever branch is configured to be the default branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansible-lint reports this error if no version: master
is specified.
Error: git-latest Git checkouts must contain explicit version
You can skip specific rules or tags by adding them to your configuration file:
# .ansible-lint
warn_list: # or 'skip_list' to silence them completely
- git-latest # Git checkouts must contain explicit version
Finished with 1 failure(s), 0 warning(s) on 82 files.
ERROR: InvocationError for command /home/runner/work/certificate/certificate/.tox/ansible-lint/bin/ansible-lint -v --exclude=tests/roles -c .ansible-lint (exited with code 2)
Which do we prefer between having version: master
preceded by # wokeignore:rule=master
or adding - '403'
to the skip-list in .ansible-lint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit 604afea takes the latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer noqa latest - https://ansible-lint.readthedocs.io/rules/latest/
# noqa latest
git:
repo: https://github.com/freeipa/ansible-freeipa
I much, much prefer putting such suppressions inline in the code rather than the config file
- the suppression is next to the problematic code
- easier to deal with conversion to collection - don't have to merge a bunch of .ansible-lint files together
- doesn't affect all files
(/me wishes the error message said this rather than "just add it to the .ansible-lint file" :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore what I wrote previously. It worked!
@@ -10,6 +10,7 @@
when: __is_beaker_env
- name: Clone ansible-freeipa repo
+ # noqa git-latest
git:
repo: https://github.com/freeipa/ansible-freeipa
dest: /tmp/freeipa-repo
And I ran tox -e ansible-lint
.
______________________________________________ summary ______________________________________________
ansible-lint: commands succeeded
congratulations :)
So if you omit the |
Yes, we can. Do we want to avoid using |
Yes, just say |
[citest] |
Add a check for usage of terms and language that is considered non-inclusive. We are using the woke tool for this with a wordlist that can be found at https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml Signed-off-by: Noriko Hosoi <[email protected]>
tests/tasks/setup_ipa.yml
Outdated
@@ -53,6 +53,7 @@ | |||
rescue: | |||
- name: FAILURE - check entropy | |||
command: cat /proc/sys/kernel/random/entropy_avail | |||
changed_when: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't worry about these - we'll change these later when we make all of the roles work with ansible-lint 6.x - looks like we have some ansible-core 2.14 work to do as well - warn: false
breaks with 2.14
CHANGELOG.md,tests/tasks/setup_ipa.yml - Cleanup non-inclusive words.
About the 'version: master' on ansible-freeipa checkout, since I lost the argument to change it to "main", as we use it only to deploy IPA, and there won't be many changes, specially on what we need, we could pin the version to 'v1.9.0", and avoid the use of "master". |
git: | ||
repo: https://github.com/freeipa/ansible-freeipa | ||
version: master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I meant about the use of 'master'. We can safely pin version 'v1.9.0' and update it if we need in the future.
On the maintainance cost of updating it, I believe it will be updated soon, but not often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we just omit version
altogether, then git will use whatever is the default branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can, it would be better. I though it was required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required by the git module
, but it is by ansible-lint
. So, we are adding this line to skip the check by ansible-lint
.
https://github.com/linux-system-roles/certificate/pull/142/files#diff-d1ca26ec3f441ccd0c4bb18b601d19668a8ffacfab0c71694fea7b46adc9823cR13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nhosoi, although I don't understand why we can't pin the ansible freeipa version (and then don't have the # noqa
comment, this change looks good to me.
And the use of woke looks promising, specially for the future. Thank you for looking into this issue!
I'm approving these changes.
My only concern is that it stays on an old version for a long time and never gets updated, which is what has happened in the past: So if we have some (preferably automated) process for regularly updating the version, that's fine with me.
|
Me, too. @rjeffman, do you want me to revert the |
Hmm... I have bug to fix where an external dependency is broken. Maybe we could have a Github action that setup all the testing dependencies. But that's for the future, I'm fine with this PR as it is. |
[citest] |
[1.1.8] - 2023-01-20 -------------------- ### New Features - none ### Bug Fixes - ansible-lint 6.x fixes ### Other Changes - Add check for non-inclusive language (linux-system-roles#142) - Cleanup non-inclusive words - ignore files for ansible-test 2.13 and 2.14 (linux-system-roles#149) Signed-off-by: Rich Megginson <[email protected]>
[1.1.8] - 2023-01-20 -------------------- ### New Features - none ### Bug Fixes - ansible-lint 6.x fixes ### Other Changes - Add check for non-inclusive language (#142) - Cleanup non-inclusive words - ignore files for ansible-test 2.13 and 2.14 (#149) Signed-off-by: Rich Megginson <[email protected]> Signed-off-by: Rich Megginson <[email protected]>
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml
Note: this commit uses the customized woke placed locally in
.github/actions/custom-woke-action. It will be replaced with
the official woke once get-woke/woke#252
(Add an option "--count-only-error-for-failure") is processed.
CHANGELOG.md - cleanup non-inclusive words.
tests/tasks/setup_ipa.yml - Apply "wokeignore:rule"