-
Notifications
You must be signed in to change notification settings - Fork 970
Session runPreMigrations is not working #10595
Comments
We used to have an upgrade version value in session store, I don't see it anymore. And you could control whether an upgrade path is run or not. I think that would be the best way to control whether to have migrations steps or not. If it's not there anymore then you can just create a new one and if it isn't present then go to the migration step and set that version up one. |
I think you can use lastAppVersion, if it's not equal or greater than the current version, or doesn't exist, then you can assume pre-migrations need to run. |
This should only be an issue with 0.21 and newer (specifically with site split). I verified this by writing tests for the existing migrations, which worked OK. You can see those here: 9ad7b4f You can view the 0.18.x sessionStore here (before bookmark, bookmarkFolders, etc) browser-laptop/app/sessionStore.js Line 473 in a83fc64
|
I'd like to propose moving this to 0.21.x (where site split happened). @NejcZdovc, maybe you can help me write the tests 😄 |
More progress made with 0dfd283 (I've been writing tests and then fixing the issue after the test fails) |
We're finally coming around to 0.20.x 😄 To recap, here's the work I've done so far: Commit 1 - add unit tests for existing code Commit 2 - adding tests for site split code migrations; fixing as needed Commit 3 - fixing more of the site split code migrations |
This is a follow up to: - 9ad7b4f - 0dfd283 Auditors: @NejcZdovc
This is a follow up to: - 9ad7b4f - 0dfd283 Auditors: @NejcZdovc
Covered by automated tests- but manual test plan captured in #12369 😄 👍 |
Opening after @NejcZdovc found an issue with cache |
Resolves brave#10595 Auditors: Test Plan:
Fixes cache migration from 0.19 to 0.20
Fixes cache migration from 0.19 to 0.20
Fixes cache migration from 0.19 to 0.20
Describe the issue you encountered:
Session upgrade is not working anymore, because now we merge default app state and current session data. Because of that things that should not exist (before 0.21 for example bookmarks (https://github.com/brave/browser-laptop/blob/master/app/sessionStore.js#L631) and bookmarkFolders (https://github.com/brave/browser-laptop/blob/master/app/sessionStore.js#L587)) are now empty lists or objects. Because of that all our checks are failing.
This was broken with #10305, were we merged this data https://github.com/brave/browser-laptop/pull/10305/files#diff-9e0c81a9a3f51c8a895685e3183a1452R754.
The text was updated successfully, but these errors were encountered: