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

[dashboard] Add global timeout for Public APIs and better error message #18902

Closed
wants to merge 7 commits into from

Conversation

mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented Oct 10, 2023

Description

  • Add default 4s timeout to public api
  • Wrap public api errors to add method name

On dashboard, we will see changes (If listTeams API hang)

Before After Add Timeout 👍 After Wrap Errors 👍
Show hanging page until server respond (never timeout), and never log errors Timeout for 4s, and after useQueryRetry, log errors and goes to Error page Same with After Add Timeout + better error message wrap
image image image
Summary generated by Copilot

🤖 Generated by Copilot at 5990704

This pull request improves the error handling of the public API calls and adds a temporary delay for testing the dashboard UI. It introduces a WrapError class and a wrapServiceError function in public-api.ts, and a WIP delay in gitpod-server-impl.ts.

Related Issue(s)

Related EXP-775

How to test

  • Debug commit has added, it mocked listTeams API hanging situation
  • Go to preview env, it should stuck on /workspaces page and lead to Error page like below

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@roboquat roboquat added size/S and removed size/XS labels Oct 10, 2023
@roboquat roboquat added size/M and removed size/S labels Oct 10, 2023
@mustard-mh mustard-mh changed the title [WIP] investigate [dashboard] Add global timeout for Public APIs and better error message Oct 11, 2023
@akosyakov
Copy link
Member

akosyakov commented Oct 16, 2023

We discussed with @mustard-mh first deploy improvements for ListTeams API and see an effect. We think that default timeouts are generally beneficial, but we need to be sure that all calls now can retry not fail, and server should also cancel such aborted requests to reduce the load.

I also opened EXP-814 to consider it more holistically as part of gRPC migration.

@mustard-mh mustard-mh closed this Nov 14, 2023
@mustard-mh mustard-mh deleted the hw/papi-hang branch January 24, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants