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

feat: add notifications filtering by processors #24731

Merged
merged 2 commits into from
May 22, 2024

Conversation

ydayagi
Copy link
Contributor

@ydayagi ydayagi commented May 12, 2024

Hey, I just made a Pull Request!

Allow processors to distinguish low and high-importance notifications
The first use would be for email processor
Users usually want only high-importance notifications in their emails
Implementation is based on this suggestion #24322 (comment)

@ydayagi ydayagi requested review from a team as code owners May 12, 2024 16:18
@ydayagi ydayagi requested a review from Rugvip May 12, 2024 16:18
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented May 12, 2024

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-notifications-backend-module-email plugins/notifications-backend-module-email minor v0.0.1
@backstage/plugin-notifications-backend plugins/notifications-backend minor v0.2.1
@backstage/plugin-notifications-node plugins/notifications-node minor v0.1.4

@drodil
Copy link
Contributor

drodil commented May 13, 2024

Missing changeset + API report updates

@ydayagi
Copy link
Contributor Author

ydayagi commented May 15, 2024

Missing changeset + API report updates

fixed

@ydayagi ydayagi force-pushed the flpath1289 branch 2 times, most recently from e3828aa to 74208fc Compare May 15, 2024 09:42
@ydayagi
Copy link
Contributor Author

ydayagi commented May 15, 2024

@drodil I made the requested changes. who approves/merges? you?

@drodil
Copy link
Contributor

drodil commented May 15, 2024

@ydayagi no I cannot do that, it's either @mareklibra @Rugvip or @freben

@Rugvip
Copy link
Member

Rugvip commented May 15, 2024

@drodil is it good to ship from your PoV?

@drodil
Copy link
Contributor

drodil commented May 15, 2024

Hm. It's not a major release for starters. Also not sure if the naming convention is understandable as there are no docs. Maybe also there could be other filters included in the first place and not just to get one specific functionality to work; maximumSeverity, topics from the top of my head.

Additionally this change itself does nothing yet and additional changes are required to the actual processors to make this work but that can be done in a separate PR.

@ydayagi
Copy link
Contributor Author

ydayagi commented May 15, 2024

Hm. It's not a major release for starters. Also not sure if the naming convention is understandable as there are no docs. Maybe also there could be other filters included in the first place and not just to get one specific functionality to work; maximumSeverity, topics from the top of my head.

Additionally this change itself does nothing yet and additional changes are required to the actual processors to make this work but that can be done in a separate PR.

there is no real use for filters other than minSeverity at the moment.
after this is merged I will create PR for email processor to use minSeverity filter.
I don't see any real life use case for maxSeverity nor for topics

@drodil
Copy link
Contributor

drodil commented May 16, 2024

@ydayagi you mean you don't have a use case for those filters? Backstage is a framework and should be developed as such.

@ydayagi
Copy link
Contributor Author

ydayagi commented May 16, 2024

@ydayagi you mean you don't have a use case for those filters? Backstage is a framework and should be developed as such.

You are right. I meant that maxSeverity to my knowledge/experience might not have a legitimate use case. But you are right. It is better to have it.
Lets be productive here.
What would you like to add in order to have this merged and used by all of backstage users?
Topics and maxSeverity?
There are string fields such as scope and topic.
What about replacing the topic filter with a 'text filter' that searches all descriptive string fields? I mean title description scope topic.
I think that nowadays people do a more broad text search rather then a specific one. @Rugvip WDYT too?

@ydayagi
Copy link
Contributor Author

ydayagi commented May 20, 2024

@mareklibra @drodil @Rugvip
I added all filters suggested by drodil plus implementation in email processor

Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>
@mareklibra
Copy link
Contributor

Honestly, I do not see a use-case for the maxSeverity either, but there is just no harm in having it.

Once we have several processors implemented, such filtering will be copy-pasted in each of them.
I would rather see the filtering logic to be shared and implemented once before passing a notification down to a processor.

I will not block merging of this PR on that, let's keep this idea for a future refactoring.

@mareklibra
Copy link
Contributor

mareklibra commented May 21, 2024

It LGTM, just the change is minor, not major (pushing a commit changing it)

Signed-off-by: Marek Libra <marek.libra@gmail.com>
@mareklibra mareklibra merged commit 484d11f into backstage:master May 22, 2024
28 checks passed
Copy link
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.28.0 release, scheduled for Tue, 18 Jun 2024.

Copy link
Contributor

Uffizzi Cluster pr-24731 was deleted.

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.

None yet

4 participants