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

reduce background network access #5566

Merged
merged 1 commit into from
Sep 15, 2024
Merged

reduce background network access #5566

merged 1 commit into from
Sep 15, 2024

Conversation

sqs
Copy link
Member

@sqs sqs commented Sep 13, 2024

Skip the UpstreamHealthProviderCheck if the window is not focused, and try again when the window becomes focused again. Some users have OS firewalls that make periodic background network access annoying for users. See https://linear.app/sourcegraph/issue/CODY-3745/codys-background-periodic-network-access-causes-2fa.

This check is used to gather latency information to properly measure actual latency for autocomplete. As long as the user has VS Code focused for slightly more than 10 seconds, it will still gather the necessary latency information for these calculations.

Fixes https://linear.app/sourcegraph/issue/CODY-3745/codys-background-periodic-network-access-causes-2fa

Test plan

Open VS Code and check logs for the UpstreamHealthProvider call. Ensure that it does not trigger when the window is not focused, and then it triggers within 10 seconds of being focused after that.

Changelog

Suppressed Cody's background process for monitoring latency to the Sourcegraph endpoint, which was used to calculate autocomplete latency for performance tracking purposes. For users with OS firewalls that notify on background network access, this will reduce notification annoyance.

@sqs sqs requested review from valerybugakov and a team September 13, 2024 08:03
Skip the UpstreamHealthProviderCheck if the window is not focused, and try again when the window becomes focused again. Some users have OS firewalls that make periodic background network access annoying for users. See https://linear.app/sourcegraph/issue/CODY-3745/codys-background-periodic-network-access-causes-2fa.

This check is used to gather latency information to properly measure actual latency for autocomplete. As long as the user has VS Code focused for slightly more than 10 seconds, it will still gather the necessary latency information for these calculations.

Fixes https://linear.app/sourcegraph/issue/CODY-3745/codys-background-periodic-network-access-causes-2fa
@sqs sqs merged commit 06d1c09 into main Sep 15, 2024
19 checks passed
@sqs sqs deleted the sqs/bg-network-access branch September 15, 2024 23:22
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