-
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
base: develop
Are you sure you want to change the base?
[ENG-8064] Add New Notifications Data Model (Refactor Notifications Phase 2) #11151
Conversation
3a8b414
to
57b0bd1
Compare
2b8ba0d
to
c449599
Compare
ad18e9d
to
300524c
Compare
2dee1b2
to
2dbcbf7
Compare
9238258
to
37b419a
Compare
afc3815
to
b6bbeed
Compare
1a4314d
to
2894a24
Compare
30b3720
to
6239379
Compare
@@ -435,12 +435,10 @@ class CeleryConfig: | |||
'scripts.generate_sitemap', | |||
'osf.management.commands.clear_expired_sessions', | |||
'osf.management.commands.delete_withdrawn_or_failed_registration_files', | |||
'osf.management.commands.check_crossref_dois', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Johnetordoff this sent notifications and was seemingly unused
'osf.management.commands.find_spammy_files', | ||
'osf.management.commands.migrate_pagecounter_data', | ||
'osf.management.commands.migrate_deleted_date', | ||
'osf.management.commands.addon_deleted_date', | ||
'osf.management.commands.migrate_registration_responses', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Johnetordoff this sent notifications and was seemingly unused
@@ -456,10 +454,9 @@ class CeleryConfig: | |||
|
|||
med_pri_modules = { | |||
'framework.email.tasks', | |||
'scripts.send_queued_mails', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Johnetordoff task removal add to notes.
@@ -598,156 +590,110 @@ class CeleryConfig: | |||
# 'scripts.analytics.upload', | |||
# ) | |||
|
|||
# celery.schedule will not be installed when running invoke requirements the first time. | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Johnetordoff I'm removing this because the comment is no longer correct.
8f41491
to
a65fa08
Compare
a65fa08
to
33d6fda
Compare
a12d8c8
to
e2dcfe5
Compare
ee98f7f
to
6ce12ec
Compare
6ce12ec
to
ffe8e89
Compare
…/CenterForOpenScience/osf.io into add-new-notifications-data-model # Conflicts: # api_tests/nodes/views/test_node_contributors_detail.py # api_tests/nodes/views/test_node_contributors_list.py
ffe8e89
to
27d4ec4
Compare
…/feature/notification-migration-refactor [ENG-8823] Migration Improvements for notification refator
21dc509
to
d9ca75f
Compare
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