Last modified: 2014-02-26 12:55:24 UTC
If you add additional fields to your event that aren't in the schema+id you specify, efLogServerSideEvent nevertheless logs the event with isValid: true. In the same situation client-side logEvent() will log with isValid: false and a warning "Unrecognized property: (bogus field's name)". Depending on how json2sql handles this, the event won't be inserted in the SQL table, or will generate a set of table columns unsuitable for future events. To reproduce, just add a "boGUSNewKEY" => 666, to a server-side event in PHP.
This is permitted by the JSON Schema draft v3: > 5.4. additionalProperties > > This attribute defines a schema for all properties that are not > explicitly defined in an object type definition. If specified, the > value MUST be a schema or a boolean. If false is provided, no > additional properties are allowed beyond the properties defined in > the schema. The default value is an empty schema which allows any > value for additional properties. <http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4> Nevertheless, this bug is valid, because: 1) Client-side and server-side validation should behave the same way 2) A stricter interpretation of the draft in which additional values are disallowed seems sensible.
Patch in Gerrit: https://gerrit.wikimedia.org/r/#/c/46501/
Merged by Ori on the 29th.
[moving from MediaWiki extensions to Analytics product - see bug 61946]