Create system note on MR when Fix Pipeline flow starts investigating a failure

Problem

Today the Fix Pipeline flow only comments on the merge request at the very end of its execution, after the new Draft MR with the fix has been created. There is no visual indicator on the failing MR that the flow has been triggered and is currently running. This means:

  • The MR author has no idea the flow is investigating the failure
  • The author races to fix the problem themselves, unaware help is on the way
  • By the time the flow's output appears (as a separate Draft MR), the author has often already moved on

This was identified in &21180 (note) by @fabiopitino.

What we did

Implemented in !231534 (merged), the Fix Pipeline flow now creates a system note on the original MR immediately when it starts, rather than only commenting at the end.

The changes include:

  • Added a resolve_noteable lambda to fix_pipeline/v1 so the workflow resolves its MR from the pipeline URL
  • The existing system-note path in CreateWorkflowService now fires for fix_pipeline flows (previously skipped due to initial_discussion)
  • Inlined WorkflowNoteableGetter into Workflow#noteable and deleted the concern
Edited by Fabio Pitino