Page MenuHomePhabricator

Fix "Must provide the 'topic' parameter" in ORES /precache endpoint
Closed, ResolvedPublic

Description

As part of T211248: Modern Event Platform: Stream Intake Service: Migrate eventlogging-service-eventbus events to eventgate-main, we migrated revision-create to a slightly modified format We no longer user meta.topic, but instead, use a more generic meta.stream. This broke the change-prop requests to ORES /precache with ORES returning a 400 error: "Must provide the 'topic' parameter".

Petr has deployed a temporary workaround in change-prop to keep things working.

ORES should do one of the following

  • not use meta.topic (is it needed there for /precache?)
  • switch to using meta.stream
    • and/or make the stream field configurable, e.g. stream_field and set it to meta.stream.

Once this is done Petr can remove his temporary workaround.

Event Timeline

Is there documentation for meta.stream? Should we expect the same data in a different field?

I'm not sure about the doc, @Ottomata might know more, but yes, the only change is .meta.topic renamed to .meta.stream, the value would be the same.

It looks like we are using "meta.topic" here: https://github.com/wikimedia/ores/blob/master/ores/wsgi/util.py#L186

The only difference I see is that meta.topic included the datacenter and meta.schema is just a raw schema name (which is way easier to work with). If that's right, then this PR should be good: https://github.com/wikimedia/ores/pull/328

Great! I left a comment there. It is 'meta.stream' not meta. schema. The [[ https://github.com/wikimedia/eventgate#eventvalidator-class--event-schema-urls | schema uri now lives at $schema top level. ]]

Thanks! Was working too fast. I think I've got your changes. Please take another look :)

This change has been deployed. Should be good to remove the work-around.