Pipelines with running status but valid finished_at

Description

When a pipeline is retried using RetryPipelineService, the service creates clones of individual jobs but fails to properly reset the pipeline's state. Specifically, the finished_at timestamp remains set from the previous pipeline execution while the pipeline status changes to "running".

Impact

This creates data inconsistency where pipelines are actively running but have a finished_at timestamp indicating they've already completed. While this doesn't affect duration calculations (since Gitlab::Ci::Pipeline::Duration calculates from build duration), it creates confusing and contradictory pipeline state information.

Current Behavior

  • Pipeline retry clones individual jobs successfully
  • Pipeline status correctly updates to "running"
  • finished_at timestamp is not cleared/reset
  • Pipeline appears both running and finished simultaneously

Proposed Solution

Modify RetryPipelineService to clear the finished_at timestamp when retrying a pipeline.

Note: Outside the scope but it would be more accurate to track finished_at and started_at individually for each pipeline retry, but this is more data and work without a real business need ATM.

Edited Feb 04, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading