pipeline-mini-graph doesn't update each stage's status in realtime
Summary
Merge request page is using /*namespace_id/:project_id/merge_requests/:id/pipelines
endpoint for realtime-update, and this is cached by Gitlab::EtagCaching::Middleware
, and this cache is expired when pipeline updated (ExpirePipelineCacheService
is invoked only when pipeline status changed), i.e. there are only three occasions to update pipeline-mini-graph(pending -> running -> suceess/failed). This should be updated per build status changed.
Steps to reproduce
- Run pipeline
- Watch the pipeline-mini-graph from [MR page -> Pipelines tab]
What is the current bug behavior?
- pipeline-mini-graph doesn't correspond to each stage's status. (
merge_requests/:id/pipelines
still returns 304 even if each stage's status changed.)
What is the expected correct behavior?
- pipeline-mini-graph corresponds to each stage's status. (
merge_requests/:id/pipelines
returns 200 when each stage's status changed.)
Possible fix
Exipre Etag cache of merge_requests/:id/pipelines
when build status changed
Relevant logs and/or screenshots
Related #31040 (closed)