Skip to content
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

[Intermittent] Email preferences are not always saved #970

Open
mariaberlinger opened this issue Feb 6, 2023 · 3 comments
Open

[Intermittent] Email preferences are not always saved #970

mariaberlinger opened this issue Feb 6, 2023 · 3 comments

Comments

@mariaberlinger
Copy link

FxA Affected versions:

  • 1.251.3

Prerequisites:

  • User is on the “Manage your Email Preferences”

Steps to reproduce:

  1. User checks some email sections;
  2. User clicks on the Save button;
  3. “Consider is done” messages is displayed;
  4. User clicks on the “Back to email preferences” link;
  5. User is now back on the “Manage your Email Preferences”;
  6. Email preferences are properly saved;
  7. Uncheck the emails checkboxes;
  8. Click the Save button;
  9. Click on the “Back to email preferences” link;
  10. Observe the checkboxes on the “Manage your Email Preferences”;

Expected results:

  • Email preferences are properly saved;

Actual results:

  • Email preferences are not properly saved;

Notes:

  • See the attached screen record;
    Email pref not always saved
@alexgibson
Copy link
Member

Thanks for reporting, I can reproduce this.

@alexgibson
Copy link
Member

I've done some local testing on this and the issue is certainly intermittent, however I was able to debug a bit:

  • As far as i can tell, the issue doesn't seem to be in bedrock's front-end sending stale data. I can see the correct newsletters in the POST request each time after updating.
  • When the bug occurs, I can see the incorrect newsletters being returned in the basket API call when the page loads after clicking "back to email-preferences". Setting {cache: 'no-store'} in the fetch request does not seem to make any difference. Neither does hard force-refreshing the browser.
  • After a couple of minutes, refreshing the page again will suddenly return the updated data.

Given the above, might the issue be due to a delay somewhere when processing the initial preference change?

@stevejalim
Copy link
Contributor

Yeah, the requests go in to a task queue, so the update won't always be immediate. In the past it's taken a few mins for things to work through the pipes.

Might be that we need to scale up the queue workers, but I also note that @robhudson is planning some work to replace the current task queue tooling with a different setup, so that might be a good time to revisit throughput

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

No branches or pull requests

3 participants