Skip to content

[ENG-7962] Fix User Setting Response Payload async mailchimp perference change issues #11136

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
wants to merge 4 commits into
base: feature/pbs-25-09
Choose a base branch
from

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented May 9, 2025

Purpose

Correct issues where PATCH responses wouldn't show preferences as updated due to async mailchimp task execution. Overrides instance model to return changed value, even though db value is unchanged until mailchimp confirms.

Changes

  • adds special case for returning desired value synchronously
  • removes update_osf_help_mails_subscription because it's not used, but tested.
  • adds test cases

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

https://openscience.atlassian.net/browse/ENG-7962

@Johnetordoff Johnetordoff changed the title Fix User Setting Response Payload async mailchimp perference change issues [WIP][ENG-7962] Fix User Setting Response Payload async mailchimp perference change issues May 9, 2025
@Johnetordoff Johnetordoff changed the base branch from develop to feature/pbs-25-09 May 9, 2025 17:44
@Johnetordoff Johnetordoff force-pushed the fix-user-setting-return branch from 628f9ee to c43b4ee Compare May 9, 2025 18:54
@Johnetordoff Johnetordoff force-pushed the fix-user-setting-return branch from 3727127 to 99bf004 Compare May 9, 2025 19:43
@@ -602,10 +599,6 @@ def impute_names(**kwargs):
return auth_utils.impute_names(name)


def update_osf_help_mails_subscription(user, subscribe):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why this exists and there's multiple tests for it, so I'm just removing it to cut down on the number of tests.

@Johnetordoff Johnetordoff changed the title [WIP][ENG-7962] Fix User Setting Response Payload async mailchimp perference change issues [ENG-7962] Fix User Setting Response Payload async mailchimp perference change issues May 9, 2025
@Johnetordoff Johnetordoff marked this pull request as ready for review May 9, 2025 20:10
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.

1 participant