Skip to content

Global Search - Timeout Page

Zack Cuddy requested to merge 300203-global-search-timeout-page into master

What does this MR do?

Closes #300203 (closed)

This change rescues the query timeout that sometimes occurs are broad/massive searches done on the Global Search page. Currently when this happens the fallback 500 page is rendered which is confusing to users.

Instead we rescue the response and render the view with the @timeout variable. This in turn renders the the search page with a timeout message. This allows users to both refine their current search as well as understand what went wrong instead of just being hit with a blanket 500.

How to test

Getting your GDK to timeout by itself will be a great challenge. Instead I have provided a small patch that will force the search queries to timeout almost every time.

  1. Download the patch force_timeout.txt
  2. Fetch and checkout this branch git fetch origin 300203-global-search-timeout-page & git checkout 300203-global-search-timeout-page
  3. Copy the entire file contents from the patch you downloaded in step 1
  4. Run the command pbpaste | git apply from your /gitlab directory - This should add some local code changes
  5. Navigate to Global Search http://127.0.0.1:3000/search and search something
  6. It should timeout, but if it doesn't try a few more times/changing tabs/etc.

Screenshots (strongly suggested)

w/o promotion w/ promotion
Timeout w/ Sidebar Timeout_w__Sidebar_-_No_Ad Timeout_w__Sidebar_-_Ad
Timeout w/o Sidebar Timeout_w_o_Sidebar_-_No_Ad Timeout_w_o_Sidebar_-_Ad
Results w/ Sidebar (No Change) Results_w__Sidebar_-_No_Ad Results_w__Sidebar_-_Ad
Results w/o Sidebar (No Change) Results_w_o_Sidebar_-_No_Ad Results_w_o_Sidebar_-_Ad

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #300203 (closed)

Edited by Zack Cuddy

Merge request reports