Skip to content
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

Cacie/fix/proxy performance #31283

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

cacieprins
Copy link
Contributor

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_INTERNAL_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

@@ -227,6 +232,15 @@ const isRetriableError = (err) => {
(err.statusCode == null)
}

function noproxyPreflightTimeout (): number {
try {
return !_.isUndefined(process.env.CYPRESS_INTERNAL_INITIAL_PREFLIGHT_TIMEOUT) ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not intended for users to set? CYPRESS_INTERNAL is intended to never be used by users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
2 participants