Don't use reduced timeout for group issues list count

What does this MR do and why?

We recently attempted to enable the new work items group issues list in production, and noticed that the work items count query would regularly time out. It was found that the query was using a reduced timeout of ~5s (as a result of the fast_fail param) in the resolver. The FF has subsequently been disabled on gitlab-org.

This MR disables the fast_fail logic for the group issues list specifically, to allow the query to finish before timing out. For context, the current issues count query can take upwards of 10s to complete. You can observe this in the legacy lists by navigating to https://gitlab.com/groups/gitlab-org/-/issues, and checking the timing tab for the getIssuesCountEE query. The new work items count query is expected to perform on par with, or better than the issues query, however the 5s timeout is still low enough to regularly trip a timeout.

References

Screenshots or screen recordings

Not provided

How to set up and validate locally

While difficult to replicate the query taking >5s in a local environment, it's possible to reduce the threshold to simulate this:

  1. Update the query threshold in issuables_count_for_state.rb to a small value to simulate a timeout (e.g: ApplicationRecord.with_fast_read_statement_timeout(timeout_ms: 5) do)
  2. Enable the work_items_group_issues_list feature flag
  3. Navigate to the group issues list for a particular group
  4. Observe that no timeout occurs
  5. Switch to master, and keep the reduced timeout. Observe the An error occurred while getting work item counts. warning in the banner

Additionally, this resolver is used for the project issues list, and the epic list. You can visit both of these pages and confirm the issue / epics counts still function - though the behaviour here should be unchanged.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Matt D'Angelo

Merge request reports

Loading