Skip to content

fix alerts filter#679

Merged
IDoneShaveIt merged 1 commit into
masterfrom
fix-alerts-filter
Feb 15, 2023
Merged

fix alerts filter#679
IDoneShaveIt merged 1 commit into
masterfrom
fix-alerts-filter

Conversation

@IDoneShaveIt
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

👋 @IDoneShaveIt
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@IDoneShaveIt IDoneShaveIt merged commit 03bf105 into master Feb 15, 2023
@IDoneShaveIt IDoneShaveIt deleted the fix-alerts-filter branch February 15, 2023 06:33
Comment on lines +41 to +44
elif filter.selector:
logger.error(
f"An unsupported alerts selector has been provided - {filter.selector}!\nNo alert has been sent!"
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think desired behaviour in case of an invalid selector is "don't filter and just send all alerts forward", not "filter everything out"

assert len(filter_model_alerts) == len(model_alerts)
assert len(filter_malformed_alerts) == len(malformed_alerts)

# Test that filter with unsupported selector returns no alert
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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