Skip to content

Update pipeline header status when retrying jobs

Mireya Andres requested to merge pipeline/fix-header-status-update into master

What does this MR do?

Fixes #325557 (closed)

This fixes a bug where the pipeline status in the header does not automatically update or reflect the running status when a user retries a job manually. This is currently fixed by refreshing the page, but we want the status to update as the jobs are ran.

Since the header and the pipeline graph share the same cache, the solution presented here is to add a new query to the pipeline graph to fetch the pipeline status. This is then refetched when redrawing the graph -- the change will reflect in the header since the cache is updated.

The query for this is in app/assets/javascripts/pipelines/graphql/queries/get_pipeline_header_data.query.graphql which already has an id, allowing apollo to identify the same entity across components.

Screenshots or Screencasts (strongly suggested)

Before After
Status does not update Status automatically updates

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Mireya Andres

Merge request reports