Skip to content

node grpc spike dashboard to server #18691

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 23 commits into from
Sep 15, 2023
Merged

node grpc spike dashboard to server #18691

merged 23 commits into from
Sep 15, 2023

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Sep 11, 2023

Description

Summary generated by Copilot

🤖 Generated by Copilot at c251d76

This pull request adds new files that define and generate code for a dummy service for reliability testing using various protobuf and connect libraries. The files include a protobuf file, go files for grpc and connect-go clients and servers, and typescript files for connect-web clients and messages.

Related Issue(s)

Fixes EXP-571

How to test

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

@socket-security
Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@bufbuild/connect-web 0.2.1...0.13.0 None +2/-0 1.49 MB tstamm-buf
@bufbuild/connect-express 0.8.1...0.13.0 None +4/-4 2.2 MB tstamm-buf
@bufbuild/connect 0.8.1...0.13.0 None +0/-0 717 kB tstamm-buf


// Trigger the next middleware in the chain.
next();
return await this.userService.findUserById(subject, subject);
} catch (err) {
log.warn("Failed to authenticate user with JWT Session", err);
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure here, maybe we should call next with err, but maybe not

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR did not change the semantic though. Pleas review for it 🙏

@akosyakov akosyakov changed the title node grpc node grpc spike dashboard to server Sep 14, 2023
@akosyakov akosyakov marked this pull request as ready for review September 14, 2023 11:42
@akosyakov akosyakov requested a review from a team as a code owner September 14, 2023 11:42
@akosyakov akosyakov requested a review from geropl September 14, 2023 11:42
}

export class MetricsReporter {
private static readonly REPORT_INTERVAL = 10000;
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 can increase it to 1 min and instead do a final flush with https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon if it turns out to be a problem later

@geropl
Copy link
Member

geropl commented Sep 14, 2023

Starting to review now.

},
}),
);
// TODO(al) cover unhandled cases
Copy link
Member

Choose a reason for hiding this comment

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

👍


const context = args[1] as HandlerContext;
async function call<T>(): Promise<T> {
const user = await self.verify(context);
Copy link
Member

Choose a reason for hiding this comment

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

nit: As discussed IMO we could pull this (and some of the metrics here) into middleware. But not a priority for this PR.

@geropl
Copy link
Member

geropl commented Sep 14, 2023

FYI: Added this rule to the feature flag:
image

@geropl
Copy link
Member

geropl commented Sep 14, 2023

For some reason I never see any Hello RPC method triggered... metrics work fine though. 🤔 I wonder whether that feature flag evaluates to true....

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested and works. ✔️

Was just tired yesterday 😅

Two small nits: https://github.com/gitpod-io/gitpod/pull/18691/files#r1326861983

@akosyakov
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 352484b into main Sep 15, 2023
@roboquat roboquat deleted the ak/node_grpc branch September 15, 2023 11:46
@akosyakov akosyakov mentioned this pull request Sep 15, 2023
14 tasks
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