[go: up one dir, main page]

Skip to content

Trigger mergeRequestStateUpdated subscription when MR state changes

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

The merge request state can change to following:

  • open
  • closed
  • merged

Proposal

Trigger the mergeRequestStateUpdated when MR state changes so frontend will be able to show the updated state on the MR page.

We can trigger the subscription in the state_id state machine in MergeRequest model to trigger the subscription in an after_transition block. Ensure that it's done after_commit to prevent affecting the state machine transition in case there are Redis errors (just like how we do it for merge_status).

Implement behind a feature flag so we can roll it out gradually. This way we can turn it off easily in case an unforeseen issue occurs.

Edited by 🤖 GitLab Bot 🤖