gitlab.com Pipelines job status is not updating for individual jobs in a finished stage
When in the Pipelines view I see a status like this:
When I click on the red cross icon to see which jobs in the stage have failed, I often see something like this, which is clearly an older view, as many jobs are still showing as running:
After some time, it updates to show the complete status correctly. But as I don't want to wait, I have to refresh the whole page to force it to update.
Solution: The UI has already fetched the status for the overall pipeline stage - it can see that the stage is finished and that there were failed jobs - so it should be able to display the job status as soon as the icon is clicked - or at least start the requisite fetch as soon as that happens.
Technical Implementation
We've migrated the functionality of these status updates to GraphQL subscriptions in the broader epic. We can now listen to all job status updates across the whole Pipeline, including finished stages, and update immediately:
- Add a job level subscription scoped to a pipeline to keep the pipeline mini graph stages in-sync with their true statues. This will be used on the client side like the following (similfied):
subscription jobStatusChanged($pipelineId: CiPipelineID!) {
jobStatusChanged(pipelineId: $pipelineId) {
job {
id
status
stage {
id
name
}
}
}
}

