Rollout required `iid` field for AutoFlow-related Work Item Events
The AutoFlow workers introduced in AutoFlow: emit issue-related events (!177277 - merged) depend on the work item iid
field. In order to not retrieve it for every event in the worker it should be a required field on the respective events.
Events affected:
- Work Item created
- Work Item updated
- Work Item closed
- Work Item reopened
The MR AutoFlow: emit issue-related events (!177277 - merged) will already introduce the iid
field as an optional event field and the new AutoFlow workers will use it if available or else retrieve it from the database.
According to https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/event_store.md#add-properties two more rollout phases need to be addressed:
Rollout 1:done in AutoFlow: emit issue-related events (!177277 - merged)
Add new properties as optional (notrequired
).Update the subscriber so it can consume events with and without the new properties.- Rollout 2:
- Change the publisher to provide the new property
- Rollout 3: (if the property should be
required
):
- Change the schema and the subscriber code to always expect it.