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

[usage-api] Use better typescript generator #12903

Merged
merged 1 commit into from
Sep 13, 2022
Merged

[usage-api] Use better typescript generator #12903

merged 1 commit into from
Sep 13, 2022

Conversation

svenefftinge
Copy link
Member

Description

This PR uses an alternative typescript generator for the protobuf bindings, that generates more ideomatic TypeScript.

Related Issue(s)

Fixes #12880

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-payment

@svenefftinge svenefftinge marked this pull request as ready for review September 13, 2022 11:46
@svenefftinge svenefftinge requested a review from a team September 13, 2022 11:46
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 13, 2022
Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

PR could benefit from a nicer description to explain that it's using nice-grpc which is a higher level abstraction on top of improbable/grpc-web and uses modern TS to wrap the client into a more usable form.

Change looks great, thanks for digging into this. Let's see how it works for the usage service and we can then migrate the remaining grpc clients instances.

@roboquat roboquat merged commit e3ed2c6 into main Sep 13, 2022
@roboquat roboquat deleted the se/better-ts-api branch September 13, 2022 12:34
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 14, 2022
@@ -264,19 +258,14 @@ export const productionContainerModule = new ContainerModule((bind, unbind, isBo

bind(NewsletterSubscriptionController).toSelf().inSingletonScope();

bind(UsageServiceClientConfig).toDynamicValue((ctx) => {
bind<UsageServiceClient>(UsageServiceDefinition.name).toDynamicValue((ctx) => {
Copy link
Member

Choose a reason for hiding this comment

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

@svenefftinge, shouldn't that be bound in singleton scope?

Asking, because of that one of the changes being introduced/deployed after which we see a severe memory leak.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think it can be in singleton scope as well. But if this increases leakage it could be there are other components that leak as well and hold references to these instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/XXL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[protobuf] Use better TypeScript binding
4 participants