Loading
Keep the pipeline header when the pipeline is no longer found
What does this MR do and why?
After a pipeline is deleted from its page, the whole page header can disappear until the redirect to the pipelines list.
The pipeline graph refreshes every 10 seconds. If a refresh runs while the delete request is still in progress, it gets pipeline: null, because the pipeline no longer exists. The graph shares its Apollo cache with the header, so the header also gets null, and its template reads pipeline.id from null.
The header now keeps the last loaded pipeline when the query returns no pipeline. The graph already does the same (see #323213 (closed)).
The full investigation, with a screenshot, is in the issue.
References
Closes #630823 (closed)
How to validate
yarn jest spec/frontend/ci/pipeline_details/header/pipeline_header_spec.jsThe new example fails without the change to pipeline_header.vue.
Edited by Laura Montemayor