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

[WIP] Test action woke.yml. [citest skip] #307

Closed
wants to merge 1 commit into from

Conversation

nhosoi
Copy link
Contributor

@nhosoi nhosoi commented Dec 8, 2022

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

Apply "wokeignore:rule=" to the non-inclusive words.

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

[citest skip]

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

[citest skip]

2 similar comments
@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

[citest skip]

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

[citest skip]

@nhosoi nhosoi force-pushed the woke-action branch 2 times, most recently from 9b21826 to 15434ac Compare December 8, 2022 01:42
@richm richm changed the title [WIP] Test action woke.yml. [WIP] Test action woke.yml. [citest skip] Dec 8, 2022
@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

@spetrosi, @richm, I'm testing get-woke/woke-action@v0 in this pr. I'm having a difficulty in the error handling in woke-action. The issue is we'd like to interpret items set to severity: warning or info not an error in the test. But with the custom config file with the setting, it still ends up with an error...

Here are the details.
I set severity: warning to the rule sanity.
https://github.com/nhosoi/tox-lsr/blob/woke/src/tox_lsr/config_files/woke.yml#L27

In woke-action, sanity is reported as a warning.

   Warning: `sanity` may be insensitive, use `confidence`, `quick check`, `coherence check` instead

But the action itself fails as follows:

https://github.com/linux-system-roles/logging/actions/runs/3650221774/jobs/6165933434
  Error: files with findings: 1
  2022-12-08T16:36:50Z FTL error="files with findings: 1"
  Error: Process completed with exit code 1.

I also tried disabling fail-on-error:

fail-on-error: false

Then, the action passes even if any real error is reported... (;_;)

@richm
Copy link
Collaborator

richm commented Dec 8, 2022

@nhosoi not sure - can you make it work if you run it locally? You may have to dig into the source code to figure out what it is doing. Or file an issue in the woke github - the authors are pretty responsive.

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 8, 2022

@nhosoi not sure - can you make it work if you run it locally?

Do you mean running woke-action locally? If so, I have not tried it yet. Could you please tell me how to run it?

Never mind... Basically, running woke-action/entrypoint.sh or its contents, isn't it?

Yes, I got the same result set in my local running. If I set INPUT_FAIL_ON_ERROR to true, it reports an error regardless of the severity.

$ woke   --output github-actions   --exit-1-on-failure="${INPUT_FAIL_ON_ERROR:-false}" -c https://raw.githubusercontent.com/nhosoi/tox-lsr/woke/src/tox_lsr/config_files/woke.yml
::warning file=CHANGELOG.md,line=426,col=57::`sanity` may be insensitive, use `confidence`, `quick check`, `coherence check` instead
Error: files with findings: 1
2022-12-08T10:14:55-08:00 FTL error="files with findings: 1"

If I unset INPUT_FAIL_ON_ERROR, woke does not report an error, even if a real error is found.

You may have to dig into the source code to figure out what it is doing. Or file an issue in the woke github - the authors are pretty responsive.

All right. Let me take a look...

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 9, 2022

@richm, @spetrosi, could you please take a look at get-woke/woke#252?
Thanks!

@richm
Copy link
Collaborator

richm commented Dec 9, 2022

@richm, @spetrosi, could you please take a look at get-woke/woke#252? Thanks!

lgtm

@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 9, 2022

Thank you, @richm.

This PR 307 depends upon these PRs.
get-woke/woke#252
linux-system-roles/tox-lsr#97

Without get-woke/woke#252 or its replacement, this woke action fails by the existence of the word sanity.

And once linux-system-roles/tox-lsr#97 is merged, the following URL needs to be replaced with the official one.
https://github.com/nhosoi/logging/blob/woke-action/.github/workflows/woke.yml#L16

@nhosoi nhosoi force-pushed the woke-action branch 2 times, most recently from d16ce41 to af3888b Compare December 14, 2022 00:27
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v3

@@ -0,0 +1,18 @@
# yamllint disable rule:line-length
# name: woke
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# name: woke
name: woke

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

Apply "wokeignore:rule=<word>" to the non-inclusive words.
@nhosoi
Copy link
Contributor Author

nhosoi commented Dec 15, 2022

Closing this pr in favor of #310.

@nhosoi nhosoi closed this Dec 15, 2022
@nhosoi nhosoi deleted the woke-action branch February 11, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants