Merge request metrics has outdated pipeline information

As noticed at https://gitlab.com/gitlab-org/gitlab-ce/issues/50620#note_144910117, merge_request_metrics table has outdated information in the following columns:

  • latest_build_started_at
  • latest_build_finished_at
  • pipeline_id

It seems like need a background migration similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23564 to handle such merge requests.

It currently affects our merge request API as we use merge_request.metrics.pipeline information.

Ultimately with this issue we'd also want to make sure this data is updated accordingly when new pipelines are created.

Edited Apr 09, 2019 by Oswaldo Ferreira
Assignee Loading
Time tracking Loading