Skip to content

Add polling to the Jobs page

Why

Users want to have the most up-to-date status of their jobs. Currently users have to refresh the page to get an updated status of a job. Most of the product we show updates every 5-10 seconds for CI statuses but we have not introduced this ability yet for the jobs page.

Where (UI)

View: https://gitlab.com/gitlab-org/gitlab/-/jobs

Screenshot_2024-05-23_at_1.17.02_PM

Technical Proposal

  1. Add eTag caching for the view (backend). The FE uses GraphQL here, so we will need to take a look at lib/gitlab/etag_caching/router/graphql.rb as well.
  2. Pass GraphQL resource eTag to app/assets/javascripts/ci/jobs_page/jobs_page_app.vue
  3. Set headers, I.E X-GITLAB-GRAPHQL-RESOURCE-ETAG for query
  4. Set poll interval
  5. Add tests

FE docs https://docs.gitlab.com/ee/development/fe_guide/graphql.html#polling-and-performance

Edited by Payton Burdette