Talk:Event Platform/Schemas/Guidelines

Rendered with Parsoid
From Wikitech

Session token?

I would love to see some guidance about the mw.user.sessionId token. My impression is that session_token was a common field in legacy schemas, but maybe isn't used as often in the newer events? This help page should recommend a token (or better, a reusable fragment), or recommend against using this token. Awight (talk) 16:41, 27 September 2022 (UTC)Reply

Backwards compatibility

I seem to run into this requirement often and still don't fully understand what's safe. Do changes need to be both backwards- and forwards-compatible, meaning that an old event is valid according to the new schema, and a new event is valid according to the old schema? This would make even the migration listed on the wiki (adding an optional field) impossible, so I think we're only talking about strict backwards-compatibility. In this case, there are other possible changes such as * adding enum values, * providing min/max on an integer, making an optional field into a required field... Awight (talk) 10:32, 29 September 2022 (UTC)Reply

Geolocation

This phabricator comment says that including the `http.client_ip` field has additional magic effects by adding more geolocation data. Should this get documented here? DLynch (talk) 13:44, 13 October 2022 (UTC)Reply

Encouragement to use snake case is directly in conflict with Wikimedia-wide coding conventions

I appreciate the need to support case-insensitive RDMSes, so not using capitals (like normal camel case) or '-'s (for kebab case), but that doesn't suddenly jump in my mind to encouraging the anti-pattern of snake_case. If you're going to push this advice, please start a conversation at https://www.mediawiki.org/wiki/Manual_talk:Coding_conventions/JavaScript first. Jforrester (talk) 13:54, 7 June 2023 (UTC)Reply