-
Notifications
You must be signed in to change notification settings - Fork 140
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
Be ok if we can't save a ~/.observablehq file for telemetry #507
Conversation
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.
might be nice to log the error — just for us, when we test and break things?
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.
My initial reaction would be to set the id to some known value if it fails to write (since that implies that user will always be uncorrelated, which is interesting to know). Maybe all zeroes or some known UUID or something. Not a blocker though.
Hm actually maybe nulls (or undefined?) are the right things to return here. |
Going to skip the warning log because getPersistentId is a nicely contained helper function and I don't want to deal with passing effects to it so it can log… 😶 Plus, I also feel like telemetry should be as quiet as possible and not get in the way. The only error it currently bothers you with (other than the banner warning) is if you set a different origin and that origin is malformed. |
I found an async race condition in the read/write implementation which I fixed. @mythmon @Fil dunno if you want to re-review? I'm thinking I should figure out how to test the implementation of getPersistentId better. An earlier version I had passed in |
Going to merge this now and consider refactoring getPersistentId more in the future for more test coverage and maybe merge it with loadUserConfig. |
* Be ok if we can't save a ~/.observablehq file for telemetry * Use null IDs if persistence fails * Fix race condition
Fixes #408 (comment)