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

fix: also use agent on first preflight request #28340

Closed

Conversation

Roemer
Copy link
Contributor

@Roemer Roemer commented Nov 15, 2023

Closes #28423

We use a proxy in order to communicate with the "outside world". Now the preflight first tries a request to api-proxy.cypress.io but with the agent explicitly set to null. When this request fails, it retries with api.cypress.io and this time with the agent set.
I suspect that the agent has the proxy info and therefore, the first request does not use the proxy and depending on the local setup, might wait up to 1 minute before aborting and retrying with the proxy. This leads to +1 minute to every cypress run.

@cypress-app-bot
Copy link
Collaborator

@Roemer Roemer force-pushed the bugfix/use-proxy-in-cloud-api branch 3 times, most recently from 08a8529 to 838666d Compare November 15, 2023 16:38
@Roemer Roemer force-pushed the bugfix/use-proxy-in-cloud-api branch from 838666d to 4396b1c Compare November 15, 2023 16:45
@Roemer
Copy link
Contributor Author

Roemer commented Nov 16, 2023

This is extremely limiting us, as we run Cypress for a lot of projects and all of them now have 1 minute additional time for each project and I did not find a way to decrease the timeout from SIXTY_SECONDS with config or environment variables.
As the only difference between the call that works (makeReq({ baseUrl: apiUrl, agent })) and the one that does not work (makeReq({ baseUrl: preflightBaseProxy, agent: null })) is the agent, I am fairly sure that this is the issue.
Is there anything else needed to have its PR checked?

@jennifer-shehane
Copy link
Member

@Roemer Thanks for opening a PR. We'll need a test to confirm the behavior before merging and we'll take a look to review.

@cypress-app-bot
Copy link
Collaborator

This PR has not had any activity in 180 days. If no activity is detected in the next 14 days, this PR will be closed.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jul 2, 2024
@Roemer
Copy link
Contributor Author

Roemer commented Jul 11, 2024

This PR is still relevant.

@cypress-app-bot cypress-app-bot removed the stale no activity on this issue for a long period label Jul 12, 2024
@jennifer-shehane
Copy link
Member

@Roemer Oh boy, this definitely got lost. Sorry. We'll need a test to verify this behavior in order to accept the PR. Could you write a test to verify and prevent regressions?

@Roemer
Copy link
Contributor Author

Roemer commented Aug 15, 2024

Pity the PR is closed as the bug still persists. As mentioned already, it is pretty much impossible to create a test as this is dependent on a specific (corporate) network setup. Having a networking-aware developer look at it should make it fairly obvious that it is currently a bug.

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
4 participants