Skip to content

Fix 503 errors due to job count

Payton Burdette requested to merge 389347-abstract-count-from-query into master

What does this MR do and why?

On a handful of cases the jobs query fails for projects due to the count field. This MR abstracts the count into it's own query to ensure we still display jobs to the user even if the count query fails. Indexes will be added to improve the overall performance of this query in the near future here #391628 (closed).

Screenshots or screen recordings

before after
before Screen_Shot_2023-02-16_at_7.40.06_AM

How to set up and validate locally

  1. Visit Project > CI/CD > Jobs
  2. Ensure all functionality still works
  3. Test failing count query by adding manual error to query jobsCount (change this.fullPath to this.fullPathhh)
  4. View/test cache changes by console.log(existing, incoming) in app/assets/javascripts/jobs/components/table/graphql/cache_config.js to get an idea of the new incoming data

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #389347 (closed)

Edited by Payton Burdette

Merge request reports

Loading