Skip to content

perf: reduce the initial timeout for proxy connections, make configurable #31283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 17, 2025

Conversation

cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Mar 13, 2025

Additional details

Prior to sending the API request to create a run, Cypress attempts to determine how best to make requests to the Cypress Cloud via a "preflight" request. This request is first made without the CombinedAgent that supports HTTP/S proxies, to one API domain. If this request fails, the second request is made to a different API domain, and uses the CombinedAgent that uses proxy information in the HTTP_PROXY/HTTPS_PROXY environment variable.

This is done to accommodate a wide variety of network configurations.

For network configurations that block non-proxied requests to the Cypress Cloud API, the request to create a run will always carry a 60 second overhead. However, this initial request is important to determine the network capabilities of the machine that is running the tests.

With this PR, the CYPRESS_INITIAL_PREFLIGHT_TIMEOUT environment variable can be set. This can be reduced below the default 60 seconds to trim the overhead. This environment variable can also be set to -1, which will disable the non-proxied preflight request.

Steps to test

How has the user experience changed?

PR Tasks

@cacieprins cacieprins changed the title Cacie/fix/proxy performance perf: reduce the initial timeout for proxy connections, make configurable Apr 15, 2025
@cacieprins cacieprins marked this pull request as ready for review April 15, 2025 16:05
Copy link

cypress bot commented Apr 15, 2025

cypress    Run #61675

Run Properties:  status check passed Passed #61675  •  git commit 025755fa5e: fix ts
Project cypress
Branch Review cacie/fix/proxy-performance
Run status status check passed Passed #61675
Run duration 19m 06s
Commit git commit 025755fa5e: fix ts
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32140
View all changes introduced in this branch ↗︎
UI Coverage  46.18%
  Untested elements 185  
  Tested elements 163  
Accessibility  92.63%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 887  

@cacieprins cacieprins merged commit a50012b into develop Apr 17, 2025
91 of 92 checks passed
@cacieprins cacieprins deleted the cacie/fix/proxy-performance branch April 17, 2025 14:00
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 17, 2025

Released in 14.3.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.3.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issues to connect to Cypress Dashboard when behind a proxy
4 participants