Fix out-of-sync count on failed jobs widget
What does this MR do and why?
Keep the failed jobs count in sync by using GraphQL and polling. Also removes the bug prone code that caused the issue.
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Polling
We always poll for the count, and we only poll for the failed jobs in the widget when expanded.
UI
before | after |
---|---|
failed_jobs_before | failed_jobs_after |
How to set up and validate locally
- Enable feature flag
ci_job_failures_in_mr
- Visit MR with failed jobs, ensure the widget displays count and failed jobs correctly.
Related to #414321
Edited by Payton Burdette