Filter notifications by package#19771
Draft
danidoni wants to merge 1 commit into
Draft
Conversation
5254e3d to
5d2d060
Compare
This change adds a new filter in My Notifications to filter notifications by package name
5d2d060 to
65c102c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a filter in the Notifications page to filter those notifications by package.
This is a second attept, the first one was reverted due to performance issues on production.
This one addresses the performance issues by implementing an intermediate model called NotifiedPackage that stores the relationships between notifications and the several notifiables having associations with packages.
hat way, when fetching the notifications, filtering by packages and while getting results for the autocomplete in the filter we just look for precomputed packages for the notifications we want to show. Much faster than the previous attempt.
We fill the NotifiedPackage model when the notifications are being created.
There's also a backfilling task to be run just after deploying to ensure previous notifications benefit from this mechanism.