danielgtaylor / danielgtaylor/python-betterproto
Mixed up functions and endpoints
- Lingua principale
- Python
- Stelle
- 1.8k
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100