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

Wait for async migrations upon extension initialization #2604

Closed
wants to merge 2 commits into from

Conversation

ghostwords
Copy link
Member

@ghostwords ghostwords commented May 7, 2020

Follows up on #2438 by gating remaining asynchronous initialization tasks behind badger.INITIALIZED.

May help avoid test failures like https://travis-ci.org/github/EFForg/privacybadger/jobs/684005771 where for some reason we don't have anything in tabData.origins at the time getWidgetList() is called. While this problem seems related to async migrations, it's not yet clear what it is exactly. It is consistently reproducible with Firefox 52 (the previous ESR version) though. Since this issue only manifests immediately following Badger initialization (waiting two seconds avoids it), it doesn't seem to be a release blocker. (waiting on widget initialization happened in c8313e4)

Should help categorically avoid bugs like #2537, where there is a race condition between two migrations or between a migration and the rest of Privacy Badger.

We should also stop running migrations upon installation.

ghostwords added a commit that referenced this pull request May 12, 2020
@ghostwords ghostwords added the migrations Badger user data modifications label Jul 16, 2020
@ghostwords ghostwords force-pushed the wait-for-widgets-and-migrations branch 2 times, most recently from f07b883 to 0276874 Compare July 20, 2020 16:53
@ghostwords ghostwords changed the title Wait for widget definitions and async migrations upon extension initialization Wait for async migrations upon extension initialization Oct 14, 2020
@ghostwords ghostwords force-pushed the wait-for-widgets-and-migrations branch from e299097 to 164d78a Compare October 20, 2020 21:42
Added to patch data in 2016 after PSL domains weren't getting
cookieblocked even though their eTLD was on the yellowlist.

#841

Since we've been running data migrations for new installs,
has since been obscuring various other yellowlist bugs.

Should now be unnecessary following fixes in 1bf6653 and 7680ea5

This is a step towards no longer running migrations for new installs.
@ghostwords ghostwords force-pushed the wait-for-widgets-and-migrations branch from 164d78a to 581fb5c Compare October 28, 2020 20:40
@ghostwords ghostwords mentioned this pull request Mar 21, 2023
@ghostwords ghostwords closed this Mar 21, 2023
@ghostwords ghostwords deleted the wait-for-widgets-and-migrations branch March 21, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrations Badger user data modifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant