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

Proto ServiceID vs GetRequest #48

Open
lionello opened this issue Nov 27, 2024 · 2 comments
Open

Proto ServiceID vs GetRequest #48

lionello opened this issue Nov 27, 2024 · 2 comments

Comments

@lionello
Copy link
Member

lionello commented Nov 27, 2024

The request type for Get was changed from ServiceID to GetRequest (to match the gRPC naming guidelines).

Normally gRPC doesn't care about the name of the message, only the protobuf declaration of its fields, but for some reason the gRPC Node library checks the name of the message. This is likely a client-side check, since changing the name back to ServiceID fixes the issue, even though the server is still expecting GetRequest.

    Error: 13 INTERNAL: Request message serialization failure: Expected argument of type io.defang.v1.GetRequest: Error: 13 INTERNAL: Request message serialization failure: Expected argument of type io.defang.v1.GetRequest
        at callErrorFromStatus (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
        at Object.onReceiveStatus (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/client.js:193:76)
        at Object.onReceiveStatus (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
        at Object.onReceiveStatus (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
        at /Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78
        at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
    for call at
        at ServiceClientImpl.makeUnaryRequest (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/client.js:161:32)
        at ServiceClientImpl.get (/Users/llunesu/dev/pulumi-defang/tests/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
        at result (<anonymous>:763:74)
        at new Promise (<anonymous>)
        at Object.<anonymous> (<anonymous>:763:34)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

https://github.com/grpc/grpc-node/blob/8f08bbe621d251bfb6ef6331565d6562393e1d64/packages/grpc-js/src/client-interceptors.ts#L380

https://github.com/grpc/grpc-node/blob/master/packages/grpc-tools/src/node_generator.cc#L135C15-L135C20

@lionello
Copy link
Member Author

lionello commented Dec 7, 2024

Filed as grpc/grpc-node#2865

@lionello
Copy link
Member Author

Will be fixed by grpc/grpc-node#2874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant