[dashboard] proactively reconnect grpc streams #19185
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses the issue where GCP LB is set to terminate connections every 10 minutes. This results in unpredicted behavior across different browsers when using Connect WEB, leading to the reporting of an 'unknown error' instead of a specific failure. Particularly impacted are gRPC server-side streams due to their long-running nature. To mitigate this, the PR introduces a proactive approach by reconnecting gRPC streams 3 minutes before the timeout. This ensures errors are correctly reported as 'deadline exceeded' (actually 'cancelled' because of connectrpc/connect-es#954) rather than as an unknown error.
Summary generated by Copilot
🤖[deprecated] Generated by Copilot at 37667e4
This pull request enhances the public API service and its client by adding a timeout option for streaming calls, improving the error handling and testing logic, and supporting a new error code for deadline exceeded errors. It affects the files
public-api.ts
,service.tsx
,public-api-converter.ts
,error.ts
, andpublic-api-converter.spec.ts
.Related Issue(s)
Fixes #
How to test
yarn telepresence
in dashboard to update timeout to the lower value like 1 min.Documentation
Preview status
https://ak-dashboa61b82253e9.preview.gitpod-dev.com/workspaces
Run
time leeway run dev:preview --dont-test
from Gitpod workspace if it is down.Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold