You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server call logger logs OK when the call is canceled.
Repro or Code Sample
Run nifgen_standard_waveform and click the Stop button.
Expected Behavior
Log message says "CANCELLED".
Current Behavior
Log message says "OK":
PS D:\dev\measurementlink-python\examples\nifgen_standard_function> poetry run python .\measurement.py -v
2023-09-08 11:04:51,201 INFO: Measurement service hosted on port: 51284
2023-09-08 11:04:51,211 INFO: Successfully registered with discovery service.
Press enter to close the measurement service.
ed OK in 0.9954 ms
2023-09-08 11:04:56,595 INFO: Starting generation: pin_name=Pin1 waveform_type=Waveform.SINE frequency=1e+06 amplitude=2
2023-09-08 11:05:06,640 INFO: gRPC server call /ni.measurementlink.measurement.v2.MeasurementService/Measure responded OK in 10045.4617 ms
2023-09-08 11:05:09,758 INFO: Starting generation: pin_name=Pin1 waveform_type=Waveform.SINE frequency=1e+06 amplitude=2
2023-09-08 11:05:10,872 INFO: gRPC server call /ni.measurementlink.measurement.v2.MeasurementService/Measure responded OK in 1115.6107 ms
2023-09-08 11:05:28,375 INFO: Starting generation: pin_name=Pin1 waveform_type=Waveform.SINE frequency=1e+06 amplitude=2
2023-09-08 11:05:29,822 INFO: gRPC server call /ni.measurementlink.measurement.v2.MeasurementService/Measure responded OK in 1447.9786 ms
Possible Solution
Pass exception to close() method in logging code.
Your Environment
OS & Device: Windows
ni-measurementlink-service version: 1.2.0-dev2 from main
The part that isn't fixed: when the client calls measurement_service.context.abort(...), this always logs UNKNOWN regardless of the gRPC status code that the client specified. This happens because ServerContext.abort() raises an empty Exception rather than a RpcError containing the gRPC status code and details: https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_server.py#L392
Bug Report
The server call logger logs OK when the call is canceled.
Repro or Code Sample
Run
nifgen_standard_waveform
and click the Stop button.Expected Behavior
Log message says "CANCELLED".
Current Behavior
Log message says "OK":
Possible Solution
Pass exception to
close()
method in logging code.Your Environment
ni-measurementlink-service
version: 1.2.0-dev2 from mainAB#2517125
The text was updated successfully, but these errors were encountered: