woocommerce / qit-cli

A Testing Platform for WordPress Plugins and Themes
https://qit.woo.com
15 stars 2 forks source link

Configurable poll intervall to prevent 429 #186

Closed Luc45 closed 1 month ago

Luc45 commented 1 month ago

We are seeing a increase in the number of 429 we receive when communicating with the qit.woo.com domain.

When a 429 is triggered, all requests from GitHub.com to qit.woo.com are blocked for a period, so we can't really have these happening, as per convo on Slack.

This PR is a continuation of https://github.com/woocommerce/qit-cli/pull/185. After merging that and monitoring 429's, I saw some being triggered on the polling endpoints.

What's the difference between this PR and #185:

This PR mitigates 429 by adding a configurable polling interval, increasing the polling interval from 5-15 seconds to up to 60-90 seconds. It also makes it so that a wait happens on the first poll as well as to not dispatch the test and poll immediately.

This only applies when running tests with the --wait command.

Testing Instructions

Example screenshot with a polling interval set to 10 seconds

image