Skip to content

[WIP] Refactor Notifications Phase 1 #11176

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

Draft
wants to merge 39 commits into
base: develop
Choose a base branch
from

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented Jun 9, 2025

Purpose

This is the first phase of the notifications refactor project, that will update and improve the notifications model. Theis first phase is to remove all the code assassinated with notifications no longer being sent.

Changes

  • removes OSF Groups
  • removes notifications for OSF Meetings
  • removes notifications for OSF Comments
  • removes OSF Quickfiles code

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

Ostap-Zherebetskyi and others added 30 commits May 1, 2025 13:37
…move-meetings-comments-and-osf-groups-notifications

[ENG-7908] Remove Meetings, Comments and OSF Groups Notifications
…registrations remain private (#11125)

## Purpose
fix was_public state when flag spam

## Changes
- correct check if node was public when flag_spam
- use earliest confirm/flag spam log to check if node was public instead of the latest one
---
- fix TypeError when check archiving status for stuck registrations (not related to ticket ENG-7873, but it's just one line `permissible_addons = set(permissible_addons)`, so no additional testing is required)

## QA Notes
I couldn't reproduce this issue via UI, but combination `confirm_spam()` -> `flag_spam()` -> `...` breaks this feature. I'm not sure if it's exactly what's happening in our case, but since `flag_spam()` is used with automatic spam checks during node/preprint updates, it's quite possible.

## Ticket
https://openscience.atlassian.net/browse/ENG-7873
## Purpose
Embargo termination logging doesn't provide useful info regarding of what error was raised

## Changes
Improved logging, removed if statement duplicate

## Ticket
https://openscience.atlassian.net/browse/ENG-7927
## Purpose
allow admins change registration providers

## Changes
- add a dropdown menu to provider section on admin UI
- add endpoint that allows to update registration provider

## Ticket
https://openscience.atlassian.net/browse/ENG-7977
## Purpose
Update the alternate email confirmation system to v2

## Changes
- adds `/users/<user_id>/confirm/` route with views
- adds tests
- adds `/users/<user_id>/sanction_response/` route with views
- adds tests
- cleans-up and simplifies sanction_handler code to work better in different request contexts

## Ticket
https://openscience.atlassian.net/browse/ENG-7965
Fix issue where not having any external identities caused a 500
## Purpose
adds new relationship for collections a node is in.

## Changes
- splits up node detail tests into more workable files <500 that are more atomic
- add related view for collection to nodes detail
- adds tests 

## Ticket
https://openscience.atlassian.net/browse/ENG-7966
## Purpose
- Add ArtifactOutcome attributes to linked registrations

## Changes
- add annotations to  linked registration views
- add test cases
- split up tests to keep < 500 ln, clean them up and make more atomic

## Ticket
https://openscience.atlassian.net/browse/ENG-8148
…ght exception (#11161)

## Purpose
If user email already existed the error was uncaught.


## Changes
- adds change to catch 400 error 
- adds test case.
…cience/osf.io into refactor-notifications

* 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io:
  fix issue where trying another already confirmed email threw an uncaught exception (#11161)
  [ENG-8148] Add ArtifactOutcome in annotations to linked nodes  (#11158)
  [ENG-7966] Add "collected-in" relationship for Nodes (#11140)
  fix issue where not having any external identities caused a 500
  [ENG-7965] Add v2 email token confirmation endpoints (#11139)
  [ENG-8052] Fixed FilterMixin issue with multiple values of notification subscription field (#11150)
  support related_counts for view_only links (#11148)
  allow admins change registration providers (#11145)
  [ENG-7927] Improved logging for embargo termination (#11137)
  [ENG-7873] CLONE - SPAM - When Hamming a Spammed user, preprints and registrations remain private (#11125)
  Update changelog and package.json
  fix TypeError when check stucked registration
  revert async email sending (#11134)
  [ENG-7921] Add scopes for applications to full_read and full_write scopes (#11126)

# Conflicts:
#	api_tests/nodes/views/test_node_detail.py
#	api_tests/nodes/views/test_node_linked_registrations.py
#	framework/auth/oauth_scopes.py
#	tests/test_registrations/test_retractions.py
…OpenScience/osf.io into feature/notification-refactor-phase-1

* 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io:
  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:
#	api_tests/nodes/views/test_node_detail.py
#	api_tests/nodes/views/test_node_linked_registrations.py
#	framework/auth/oauth_scopes.py
#	tests/test_registrations/test_retractions.py
…hub.com/bodintsov/osf.io into feature/notification-refactor-phase-1

* 'feature/remove-remaining-quickiles-code' of https://github.com/bodintsov/osf.io:
  flake8
  fixed tests
  remove quickfiles
…ap-Zherebetskyi/osf.io into feature/notification-refactor-phase-1

* 'feature/remove_test_speed-up' of https://github.com/Ostap-Zherebetskyi/osf.io:
  update mails mock
  Update send_mail mocks
…ctor-phase-1

Update Notification Refactor to Phase 1
…OpenScience/osf.io into refactor-notifications

* 'refactor-notifications' of https://github.com/CenterForOpenScience/osf.io:
  flake8
  fixed tests
  remove quickfiles
  update mails mock
  Update send_mail mocks

# Conflicts:
#	tests/test_registrations/test_retractions.py
@Johnetordoff Johnetordoff changed the title [WIP] Refactor Notifications [WIP] Refactor Notifications Phase 1 Jun 9, 2025
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.

5 participants