Draft: [skip ci] Update the mini graph stage dropdown from ciStageJobsUpdated
What does this MR do and why?
The stage dropdown of the pipeline mini graph keeps its jobs current through a subscription. It used ciStageUpdated, which sends one job for each transition. The dropdown matched that job to its list by name. So:
- A job that was not loaded when the dropdown opened never appeared.
- A stage with many jobs sent one update for each transition to every open dropdown.
This MR moves the dropdown to ciStageJobsUpdated from !266649. It sends the stage with its jobs, so each update replaces the list:
- Retried jobs, new jobs and the last update of a burst all show up.
- The
updateQueryno longer matches by name or merges withlodash. - The websocket nodes merge a burst into one update every 500 milliseconds.
The field has @gl_introduced(version: "19.6.0"). On an older backend the field is left out of the subscription, so no update arrives and the dropdown keeps the jobs it loaded.
Relation to the failed jobs widget work
!257267 also changes this dropdown: it moves the subscription to a declarative subscribeToMore, adds a polling fallback and job actions. It still uses ciStageUpdated with name matching. When it is rebased onto this MR, it keeps its polling and job action changes and takes the subscription document and updateQuery from this MR.
Screenshots or screen recordings
The test stage dropdown of a running pipeline in GDK, subscribed to ciStageJobsUpdated (201 jobs):
![]() |
How to set up and validate locally
- Open the pipelines list of a project with a running pipeline.
- Open a stage dropdown in the mini graph.
- In
log/development.log, checkGraphqlChannel is streaming from graphql-event::ciStageJobsUpdated:stageId:.... - Let a job of that stage change status, or call
GraphqlTriggers.ci_stage_jobs_updated(job)in a Rails console. The dropdown shows the new status.
yarn jest spec/frontend/ci/pipeline_mini_graph/pipeline_stage_dropdown_spec.jsMR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
References
- Part of https://gitlab.com/gitlab-org/gitlab/-/work_items/630854, step C3
- Depends on !266649, which adds
ciStageJobsUpdated - Followed by !266648, which removes
ciStageUpdated - Overlaps with the dropdown changes in !257267
