Session IDs created by mw.user.generateRandomSessionId currently take the form of a random 80-bit hex integer. To better conform to industry standards and support cross-platform consistency, mw.user.generateRandomSessionId should instead return a v4 (random) UUID.
mw.user.generateRandomSessionId should be left in place to support its many existing consumers but should be updated to call out to a new mw.user.generateUUIDv4 method rather than employing a custom ID generation algorithm.
Existing consumers shouldn't be relying on the ID format, but it's always possible that they are, so the change should be announced in advance.
Proposed migration plan:
- Announce the planned change on wikitech-l
- Create a a new mw.user.generateUUIDv4 method leveraging the uuid library
- Update affected schemas to accept UUIDs where the current format is expected
- Update mw.user.generateRandomSessionId to call mw.user.generateUUIDv4 internally
- Update impacted EP instruments to produce events according to the updated schema versions
- Are only Event Platform schemas affected? Legacy EL schemas probably don't support pattern-based field data validation, but we should double-check this.