Skip to content

chore: rename *ConnectionTimeout to *SocketTimeout #35583

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 1 commit into from
Apr 11, 2025

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Apr 10, 2025

This is to avoid confusion in our codebase.

This is to avoid confusion in our codebase.
Copy link
Contributor

Test results for "tests 1"

4 flaky ⚠️ [firefox-page] › page/page-evaluate.spec.ts:424:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:97:5 › mobile viewport › should fire orientationchange event @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/elementhandle-bounding-box.spec.ts:22:3 › should work @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

39116 passed, 806 skipped
✔️✔️✔️

Merge workflow run.

// PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT is a misnomer, it actually controls the socket's
// max idle timeout. Unfortunately, we cannot rename it without breaking existing user workflows.
const downloadSocketTimeoutEnv = getFromENV('PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT');
const downloadSocketTimeout = +(downloadSocketTimeoutEnv || '0') || 30_000;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const downloadSocketTimeout = +(downloadSocketTimeoutEnv || '0') || 30_000;
const downloadSocketTimeout = +(downloadSocketTimeoutEnv || '0') ?? 30_000;

lets fix this bug as a drive-by as well. Before passing 0 as an env var never worked.

Copy link
Member Author

@yury-s yury-s Apr 11, 2025

Choose a reason for hiding this comment

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

The fix you suggest will always set downloadSocketTimeout to 0 if the env variable is not provided (i.e. it would be equivalent to const downloadSocketTimeout = +(downloadSocketTimeoutEnv || '0')). I can address this issue separately from safe renaming (or not touch at all).

@yury-s yury-s merged commit c9cd9dc into microsoft:main Apr 11, 2025
29 checks passed
@yury-s yury-s deleted the download-conn-timeout branch April 11, 2025 16:57
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.

2 participants