Loading
Link workflows to pipelines
What does this MR do and why?
Links workflows to pipelines for the Fix Pipeline flow.
References
Previous work for other Linkables:
- Workflows <-> MRs in !242591 (merged)
- Workflows <-> Notes in !243580 (merged)
- Workflows <-> Work Items in !240455 (merged)
How to set up and validate locally
- In your GDK go to a failed pipeline on a merge request
- Initiate Fix Pipeline flow
- Check the link was created with the correct pipeline ID:
[2] pry(main)> Ai::DuoWorkflows::Workflow.last.linked_pipelines
...
=> [#<Ci::Pipeline:0x000000013e47b848
ref: "refs/merge-requests/408/head",
sha: "66a4f0ba4b99ca632090a8d4641409f7af9eeabc",
before_sha: "0000000000000000000000000000000000000000",
created_at: "2026-02-12 02:04:50.110960000 +0000",
updated_at: "2026-02-12 02:07:21.059726000 +0000",
tag: false,
yaml_errors: nil,
committed_at: nil,
project_id: 22,
status: "failed",
started_at: "2026-02-12 02:07:03.476821000 +0000",
finished_at: "2026-02-12 02:07:21.051962000 +0000",
duration: 17,
user_id: 3076,
lock_version: 3,
pipeline_schedule_id: nil,
source: "merge_request_event",
config_source: "repository_source",
protected: false,
failure_reason: nil,
iid: 2232,
merge_request_id: 1950,
source_sha: nil,
target_sha: nil,
external_pull_request_id: nil,
ci_ref_id: 2069,
locked: "artifacts_locked",
partition_id: 100,
id: 8096,
auto_canceled_by_id: nil,
auto_canceled_by_partition_id: nil,
trigger_id: nil>]
[3] pry(main)> Ai::DuoWorkflows::Workflow.last.pipeline_links
...
=> [#<Ai::DuoWorkflows::WorkflowPipeline:0x000000014807d458
id: 1,
workflow_id: 4748,
pipeline_id: 8096,
project_id: 22,
namespace_id: nil,
created_at: "2026-07-29 22:40:24.457350000 +0000",
updated_at: "2026-07-29 22:40:24.457350000 +0000",
link_type: "source">]MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Roman Eisner