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

Silent crash on invalid regex patterns #15

Open
slackspace-io opened this issue Jul 27, 2024 · 0 comments
Open

Silent crash on invalid regex patterns #15

slackspace-io opened this issue Jul 27, 2024 · 0 comments

Comments

@slackspace-io
Copy link
Owner

If an invalid regex pattern is defined on slackwatch.exclude/include there is a silent crash/failure without notifying user

[2024-07-27T19:52:05Z INFO  slackwatch::services::workloads] Exclude pattern: *tensor*
thread 'tokio-runtime-worker' panicked at src/services/workloads.rs:128:48:
called `Result::unwrap()` on an `Err` value: Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
    *tensor*
    ^
error: repetition operator missing expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)
update_workload

Should notify in the UI that regex patterns were invalid.

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

No branches or pull requests

1 participant