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
Bug 1848200 - add migration flag to init #1751
Bug 1848200 - add migration flag to init #1751
Conversation
Conditionally migrate IDB data only if it already exists. If the project has never used an older version of Glean, then we want to avoid migration because of a potential race condition when submitting pings on first page load.
8c3273d
to
5183342
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if Local Storage is cleared? will this continue to try and migrate metrics? How long does the migration code need to be in tree, have you considered this and planned (and filed a bug) to remove it at some time in the future?
If LocalStorage is cleared, it will try and run just once. Currently, we aren't migrating most metrics - we are just migrating
That is something I've been thinking about. I'd like to maybe chat with you during our next 1:1 to get some thoughts here. In the mean time, I will file a bug so that this isn't lost in the shuffle. |
Only as long as MDN hasn't migrated (or any other project requiring migration). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's discuss in our next 1:1 how to track when everyone using Glean.js has migrated to the new version and we will file a bug about cleaning up the migration code then! Other than that, this looks good to me.
Conditionally migrate IDB data only if it already exists. If the project has never used an older version of Glean, then we want to avoid migration because of a potential race condition when submitting pings on first page load.
Pull Request checklist
glean/
folder, run:npm run test
Runs all testsnpm run lint
Runs all lintersCHANGELOG.md
or an explanation of why it does not need onemozilla/glean
repository