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

Include failed python filters in the final failure count #216

Open
xdhmoore opened this issue Jun 4, 2022 · 0 comments
Open

Include failed python filters in the final failure count #216

xdhmoore opened this issue Jun 4, 2022 · 0 comments

Comments

@xdhmoore
Copy link
Contributor

xdhmoore commented Jun 4, 2022

When a python filter fails, (even with filter_mode: any), the actions for that rule are skipped, but there's no indication in the final successful/failed file count. This is logical, because no files were matched for the rule with the failing filter, but for long jobs it's not great to have to scroll back up through the output to see if there was a failure in your python code, especially during development.

The code below shows the following final message:

success 3 / fail 0
#  organize run .\filter_fail_test.yaml --working-dir .
# assuming the existence of 3 txt files
rules:
  - name: "test"
    locations: .
    filter_mode: any
    filters:
      - extension: "txt"
      - python: |
         return "" + 3
    actions:
      - echo: "test"

  - name: "test1"
    locations: .
    filters:
      - extension: "txt"
    actions:
      - echo: "test1"

Describe the solution you'd like
A final message including an indication that filters failed. Perhaps:

success 3 / fail 0 / filter fail 4
OR
success 3 / fail 0 / some filters failed

Describe alternatives you've considered
My ideal would be a global halt as described in this issue, but the solution above would be less of a change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant