-
Notifications
You must be signed in to change notification settings - Fork 347
[ENG-8064] Add New Notifications Data Model (Refactor Notifications Phase 2) #11151
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
Open
Johnetordoff
wants to merge
160
commits into
CenterForOpenScience:refactor-notifications
Choose a base branch
from
Johnetordoff:add-new-notifications-data-model
base: refactor-notifications
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ENG-8064] Add New Notifications Data Model (Refactor Notifications Phase 2) #11151
Johnetordoff
wants to merge
160
commits into
CenterForOpenScience:refactor-notifications
from
Johnetordoff:add-new-notifications-data-model
+9,686
−13,425
Conversation
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
ecc8e88
to
3a8b414
Compare
3a8b414
to
57b0bd1
Compare
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: [ENG-7965] Add v2 email token confirmation endpoints (CenterForOpenScience#11139)
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: fix issue where not having any external identities caused a 500
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: [ENG-7966] Add "collected-in" relationship for Nodes (CenterForOpenScience#11140)
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: fix issue where trying another already confirmed email threw an uncaught exception (CenterForOpenScience#11161) [ENG-8148] Add ArtifactOutcome in annotations to linked nodes (CenterForOpenScience#11158)
…OpenScience/osf.io into add-new-notifications-data-model * 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io: flake8 fixed tests remove quickfiles update mails mock Update send_mail mocks Clean up tests Clean up tests Clean up imports Remove Meetings, Comments and OSF Groups Notifications remove osf groups remove osf groups remove osf groups remove osf groups remove osf groups # Conflicts: # tests/test_notifications.py
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: Update hybrid values for new workflow check (CenterForOpenScience#11166)
…OpenScience/osf.io into add-new-notifications-data-model * 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io: ignore Django maintenance state outside block
2b8ba0d
to
c449599
Compare
…OpenScience/osf.io into add-new-notifications-data-model * 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io: fixed bug with contributors remove superfluildous `groups` from serializer fix new and noteworth nodes bug going to Sentry
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: fixed None issue when iterate (CenterForOpenScience#11192) [ENG-8048] Remove caching to avoid incorrect results for ascendants (CenterForOpenScience#11169) [ENG-7870] Crossref DOIs not minting with _v1, OSF is displaying DOI versions with _v1 (CenterForOpenScience#11154) Update changelog and package.json [ENG-8145] [ENG-8147] Manual DOI and GUID for Preprints & Registrations - BE (CenterForOpenScience#11174)
…cience/osf.io into add-new-notifications-data-model * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: Revert "[ENG-8048] Remove caching to avoid incorrect results for ascendants (…" Revert "fixed None issue when iterate (CenterForOpenScience#11192)"
…OpenScience/osf.io into add-new-notifications-data-model * 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io:
dfe88a2
to
ad18e9d
Compare
ad18e9d
to
300524c
Compare
into add-new-notifications-data-model * 'develop' of https://github.com/CenterForOpenScience/osf.io: Bump version no. Add CHANGELOG move CROSSREF_UNAVAILABLE_DELAY to settings.py handle and 5xx status code from crossref handle 500 error from crossref Update changelog and package.json
800f27d
to
baf6d86
Compare
baf6d86
to
e7a8e3c
Compare
d59f180
to
93c938e
Compare
93c938e
to
fcce6d4
Compare
…/CenterForOpenScience/osf.io into add-new-notifications-data-model * 'add-new-notifications-data-model' of https://github.com/CenterForOpenScience/osf.io: improve notification mocking
96a0fc8
to
04a91be
Compare
653ad85
to
a081ef4
Compare
a081ef4
to
1bfaf2f
Compare
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.
Purpose
This system is designed to formalize and consolidate OSF Notifications under one system in order to better facilitate collaboration between Product, Engineers and QA and end persistent problems with notification email related tech debt. This project is the result of an extensive audit of all OSF emails and combined email digests and seeks to move the
NotificationSubscription
model out of it's transitional state having been migrated from a document based model, into it's final data model which is more regular for a relation our current relational database (django's postgress db).In order to do this I have taken @mfraezz design documents and implemented them with minor changes. This means the responsibility for sending notifications in osf.io is shared by three new models, which will have the old data migrated into them via a migration script and management command. The models are:
NotificationType
notification.yaml
a developer will be able to see at a glance if where a notification template is and what it's purpose is.NotificationSubscription
EmailDigest
model, this holds references to potentially many Notifcations models that can be compiled into a single digest this is sent at a periodic basis.Notification
Changes
notifications.yaml
to contain all notification types info it is populated via postmigrate hookNotification
NotificationSubscription
andNotificationType
send_mails
method and replaces it withemit
ofNotificationType
handle_boa_error
to pass the already decanted user object.notifications.yaml
for data dependency notificationtypescapture_notifications
mocking utilqueued_mail
EmailDigest
detect_duplicates
for duplicate subscriptionsQA Notes
Please make verification statements inspired by your code and what your code touches.
What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation
Side Effects
Ticket
https://openscience.atlassian.net/browse/ENG-8064