Regenerate the client id / first run date if needed #2723
Conversation
Old builds of products using glean, which were already executed once, once updated, might not correctly report the client id and the first run date. Since these are likely low number of developer builds, we simply regenerate these fields.
Codecov Report
@@ Coverage Diff @@
## master #2723 +/- ##
============================================
+ Coverage 82.69% 82.86% +0.16%
- Complexity 2885 2911 +26
============================================
Files 359 365 +6
Lines 12260 12403 +143
Branches 1797 1810 +13
============================================
+ Hits 10139 10278 +139
- Misses 1379 1382 +3
- Partials 742 743 +1
Continue to review full report at Codecov.
|
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.
r+ (Do we have/should we file) a bug to look at this again in 6 months to remove the cruft (after it's hopefully no longer needed)?
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.
LGTM. My comment is more just thinking out loud, and not a requirement to merge this.
// vs using the full class name with the namespace). | ||
// This should be mostly devs and super early adopters, so just regenerate | ||
// the data. | ||
UuidsStorageEngine.record(GleanInternalMetrics.clientId, UUID.randomUUID()) |
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.
Random thought -- we could record an error on the metric here so we could see how often this happens. If it shows up again in the future, it might help us detect mistakes...
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.
Ooh, I like this idea!
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.
Yeah, that might be a good idea. The thing is that, in contrast to desktop, we have no alerting on this for now. It it would be up to humans (that's us!) to manually check in that for now. I'd rather have a monitor or alerting on schema validation errors (that caught this!!!!), which is a lower hanging fruit with the tooling that's available right now. Additionally, I'm planning on prioritizing the integration test.
I filed this https://bugzilla.mozilla.org/show_bug.cgi?id=1543979 |
Old builds of products using glean, which were already executed once, once updated, might not correctly report the client id and the first run date. Since these are likely low number of developer builds, we simply regenerate these fields.
Pull Request checklist