-
Notifications
You must be signed in to change notification settings - Fork 348
[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
377
commits into
CenterForOpenScience:develop
Choose a base branch
from
Johnetordoff:add-new-notifications-data-model
base: develop
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
377
commits into
CenterForOpenScience:develop
from
Johnetordoff:add-new-notifications-data-model
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
3a8b414
to
57b0bd1
Compare
2b8ba0d
to
c449599
Compare
ad18e9d
to
300524c
Compare
2dee1b2
to
2dbcbf7
Compare
9238258
to
37b419a
Compare
afc3815
to
b6bbeed
Compare
7e0259f
to
19c838d
Compare
30a0392
to
a6e3ee8
Compare
…/centerforopenscience/osf.io into add-new-notifications-data-model * 'add-new-notifications-data-model' of https://github.com/centerforopenscience/osf.io: update subjects and mailhog tests
22e81be
to
6816040
Compare
3ca708c
to
5d0b6b4
Compare
5d0b6b4
to
b8fdc80
Compare
…/centerforopenscience/osf.io into add-new-notifications-data-model * 'add-new-notifications-data-model' of https://github.com/centerforopenscience/osf.io: fix more test stuff # Conflicts: # osf/models/schema_response.py
58799fc
to
beded5e
Compare
beded5e
to
80ab307
Compare
into add-new-notifications-data-model # Conflicts: # addons/boa/tests/test_tasks.py # api_tests/crossref/views/test_crossref_email_response.py # api_tests/draft_registrations/views/test_draft_registration_contributor_list.py # api_tests/draft_registrations/views/test_draft_registration_list.py # api_tests/institutions/views/test_institution_relationship_nodes.py # api_tests/mailhog/test_mailhog.py # api_tests/nodes/views/test_node_contributors_list.py # api_tests/nodes/views/test_node_forks_list.py # api_tests/nodes/views/test_node_relationship_institutions.py # api_tests/preprints/views/test_preprint_contributors_list.py # api_tests/providers/collections/views/test_collections_provider_moderator_list.py # api_tests/providers/preprints/views/test_preprint_provider_moderator_list.py # api_tests/providers/tasks/test_bulk_upload.py # api_tests/registrations/views/test_registration_detail.py # api_tests/requests/views/test_node_request_institutional_access.py # api_tests/requests/views/test_node_request_list.py # api_tests/requests/views/test_preprint_request_list.py # api_tests/requests/views/test_request_actions_create.py # api_tests/users/views/test_user_claim.py # api_tests/users/views/test_user_list.py # api_tests/users/views/test_user_message_institutional_access.py # api_tests/users/views/test_user_settings.py # api_tests/users/views/test_user_settings_detail.py # conftest.py # osf/models/__init__.py # osf_tests/management_commands/test_check_crossref_dois.py # osf_tests/management_commands/test_email_all_users.py # osf_tests/test_archiver.py # osf_tests/test_collection.py # osf_tests/test_collection_submission.py # osf_tests/test_comment.py # osf_tests/test_institution.py # osf_tests/test_queued_mail.py # osf_tests/test_registration_moderation_notifications.py # osf_tests/test_reviewable.py # osf_tests/test_schema_responses.py # osf_tests/test_user.py # scripts/tests/test_deactivate_requested_accounts.py # scripts/tests/test_send_queued_mails.py # scripts/tests/test_triggered_mails.py # tests/test_adding_contributor_views.py # tests/test_auth.py # tests/test_auth_views.py # tests/test_misc_views.py # tests/test_notifications.py # tests/test_preprints.py # tests/test_registrations/test_embargoes.py # tests/test_registrations/test_retractions.py # tests/test_spam_mixin.py # tests/test_user_profile_view.py # tests/test_webtests.py # website/conferences/views.py # website/mails/listeners.py # website/mails/mails.py # website/notifications/constants.py # website/notifications/utils.py # website/project/views/contributor.py # website/settings/defaults.py # website/templates/contributor_added_default.html.mako
14ca2e3
to
f0e5a91
Compare
…/CenterForOpenScience/osf.io into add-new-notifications-data-model
f0e5a91
to
6244b56
Compare
bf6dd1b
to
02d0b13
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