nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.28k stars 7.59k forks source link

Regression: Additional GRPC options can't be set anymore in Nestjs 7 #4597

Closed sjkummer closed 4 years ago

sjkummer commented 4 years ago

Bug Report

Original behavior in Nestjs 6

In Nestjs 6, it was possible to set all GRPC options, e.g. grpc.ssl_target_name_override and grpc.default_authority which are required to have GRPC-SSL enabled on localhost:

const grpcOptionsAny: any = grpcClientOptions.options;
grpcOptionsAny['grpc.ssl_target_name_override'] = 'localhost';
grpcOptionsAny['grpc.default_authority'] = 'localhost';

Breaking change

The commit 0b38029830f59d8a0092137c39ea4b30aa1377cb changed this behavior by removing ...this.options from the used option-Object:

https://github.com/nestjs/nest/commit/0b38029830f59d8a0092137c39ea4b30aa1377cb#r38494866

Now, most of the GRPC-options are unavailable when using Nestjs: https://grpc.github.io/grpc/core/group__grpc__arg__keys.html

kamilmysliwiec commented 4 years ago

Would you like to create a PR for this issue? Perhaps, we should also add other missing gRPC options to the GrpcOptions interface (to avoid as any cast). Would you be interested in contributing to this?

sjkummer commented 4 years ago

@kamilmysliwiec The list of GRPC options is quite long, but I can do an easy PR which will at least avoid casting.

kamilmysliwiec commented 4 years ago

Added in 7.1.0.