Skip to content

[test] Fix RPC retries & improve logging #18210

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 2 commits into from
Jul 10, 2023
Merged

[test] Fix RPC retries & improve logging #18210

merged 2 commits into from
Jul 10, 2023

Conversation

WVerlaek
Copy link
Member

@WVerlaek WVerlaek commented Jul 10, 2023

Description

  • Fix rpc retries, to always Instrument first after closing the connection on failure, and to return when the call succeeds (was always calling the rpc 5 times before)
  • Improve logging

Related Issue(s)

Relates to WKS-153

How to test

https://github.com/gitpod-io/gitpod/actions/runs/5506674959

Documentation

Preview status

gitpod:summary

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
  • /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

/hold

@WVerlaek WVerlaek requested review from a team July 10, 2023 09:19
@github-actions github-actions bot added team: workspace Issue belongs to the Workspace team team: IDE labels Jul 10, 2023
Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

Thanks, @WVerlaek ! Just one question.

@@ -206,32 +206,30 @@ type RpcClient struct {

func (r *RpcClient) Call(serviceMethod string, args any, reply any) error {
var err error
var new *RpcClient
cl := r
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a couple spots (below) where we can return w/o closing the RpcClient. Should we add a defer cl.Close()?

Copy link
Member Author

Choose a reason for hiding this comment

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

we only close it to then later re-open it through a new call to Instrument, in general this Call method shouldn't close the client as it can be used for more rpc calls afterwards

@WVerlaek
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 66049b3 into main Jul 10, 2023
@roboquat roboquat deleted the wv/test-fix-rpc-retry branch July 10, 2023 18:48
@roboquat roboquat added the deployed: IDE IDE change is running in production label Jul 11, 2023
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production size/M team: IDE team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants