danielgtaylor / danielgtaylor/python-betterproto

Mixed up functions and endpoints

Offen
#457 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
1.8k
Forks
234
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
compilers
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.