Update pipeline header status when retrying jobs
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
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)