Skip to content

usagestats: treat ID as anonymous if not all digits

Administrator requested to merge jc/dotcom-strconv into master

Created by: unknwon

Quoting problem statement from https://github.com/sourcegraph/sourcegraph/issues/11801#issuecomment-652300018:

The root cause is that we check length to determine if the ID looks like a UUID, but for some reason we stored double quotes along with the UUID, the length check no longer works.

https://github.com/sourcegraph/sourcegraph/blob/ce4381d9f01edd0201bf8e41c8d437e82828e494/cmd/frontend/internal/pkg/usagestatsdeprecated/usage_stats.go#L207

Checking digits is more robust. No tests added specifically for this given it's in deprecated codebase.

Fixes #11801

Merge request reports

Loading