Skip to content

Handle HTTP 429 status gracefully in end-to-end tests

Sanad Liaquat requested to merge qa-shl-handle-429-status-gracefully into master

What does this MR do and why?

Handles HTTP 429 status gracefully by waiting for the time specified in the retry_after header.

Issue: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/1014 Also related to: #341123 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable rate limits on local from Admin > Settings > Network > User and IP rate limits by checking off Enable authenticated API request rate limit and Enable unauthenticated API request rate limit and setting Maximum unauthenticated API requests per rate limit period per IP to a low value such as 2 or 3 and Unauthenticated API rate limit period in seconds to 10 seconds (for example).
  2. Run any e2e test and notice the following logs: Received 429 - Too many requests....

MR acceptance checklist

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

Edited by Sanad Liaquat

Merge request reports