Steps to replicate the issue (include links if applicable):
- Deploy a service that consumes page change events and publishes predictions classification events (e.g. revertrisk-multilingual, revertrisk-language-agnostic) with EventGate publishing enabled
- Submit a page_change event with additional fields
- Observe the EventGate response or errored schema logs
What happens?:
EventGate rejects the event with schema validation errors:
- .page should NOT have additional properties
- .performer should NOT have additional properties
- .prior_state.revision.editor should NOT have additional properties
- .revision.editor should NOT have additional properties
What should have happened instead?:
The event should not be rejected by EventGate. The constructor should only include properties defined in prediction_classification_change/1.2.0, stripping any extra fields that leaked from newer page_change fragment schemas.
In events.py all the event properties are copied which eventually ends up in adding them to the output. We should explicitly construct the event dict, picking only the properties defined in the target schema
Services affected (which need to be deployed after this change):
- revertrisk-language-agnostic
- revertrisk-multilingual
- outlink-topic-model
- article-country