danielgtaylor / danielgtaylor/python-betterproto
Mixed up functions and endpoints
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
So I was testing this out with [national instrument's grpc-device](https://github.com/ni/grpc-device) and it works pretty well so thank you however I have noticed that once in a while 2 endpoints/destinations are mixed up (So far i've only caught this one example to be fair).
So for example let's say I have 2 functions for endpoints (sorry im relatively new to grpc as a whole so not sure if terminology is correct) they are `configure_spectrum_frequency_start_stop` and `configure_spectrum_frequency_center_span` . They have the following definitions:
configure_spectrum_frequency_start_stop( vi, start_frequency, stop_frequency )
configure_spectrum_frequency_center_span( vi, center_frequency, span )
When I call one it actually executes the other and vice versa. So lets say I call `configure_spectrum_frequency_start_stop`
await client.configure_spectrum_frequency_start_stop(
vi=vi,
start_frequency=990e6,
stop_frequency=101e6
)
What is actually being called/executed on server is
await client.configure_spectrum_frequency_center_span(
vi=vi,
center_frequency=990e6
span=101e6
)
and now let's say I call `configure_spectrum_frequency_center_span` with
await client.configure_spectrum_frequency_center_span(
vi=vi,
center_frequency=100e6
span=20e6
)
what actually ends up happening/being executed on server is
await client.configure_spectrum_frequency_start_stop(
vi=vi,
start_frequency=100e6,
stop_frequency=20e6
)
When the proto files are compiled with Googles standard grpc compiler they work fine however here there seems to be a mix up when compiled with the betterproto compiler. Does anyone know why or how this is happening? Is there something I can do to maybe help fix this. Like I said I'm brand new to grpc but maybe if someone points me in the right direction as to what may be occurring I may be able to help implement a fix.
Actually there's a couple other weird quirks where things seem to get "mixed up" but this is by far the biggest and best example of this type of mixup
Guía de contribución
Línea de trabajo
Reproduce the issue using the configure_spectrum_frequency_start_stop and configure_spectrum_frequency_center_span calls described in the report, comparing betterproto-generated behavior with output from Google's standard gRPC compiler. Inspect the generated endpoints and their mapping to the two proto functions. Done means each client call reaches the matching server endpoint, including the reported frequency arguments.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- compilers
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100