refactor: [M3-7650] - Refactor Cypress region utils, address region capacity-related flake #10242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📝
This refactors our Cypress region handling utilities and makes a few changes intended to eliminate test failures related to region capacity, and better position us for upcoming changes (e.g. GECKO, DC Get Well).
Changes 🔄
chooseRegion(s)
utilities -- this is the most relevant change w.r.t. test stability, and is done using a simple blacklist (but could perhaps be done dynamically in the future)chooseRegion
andchooseRegions
utilitieschooseRegions
(previously only able to be done forchooseRegion
)chooseRegion(s)
utils mentioned above relate to this, and I've also added a 15 second timeout when Cypress (not Cloud) fires an API request that results in a 429. I'll keep an eye on this to see if makes any impact.How to test 🧪
We can rely on the CI for this. Assuming there are no region-related failures (or other significant failures), I may run the tests multiple times just to build confidence in the changes before going forward.
As an Author I have considered 🤔
Check all that apply