gnoi icon indicating copy to clipboard operation
gnoi copied to clipboard

containerz: remove ambiguous error signaling

Open LimeHat opened this issue 5 months ago • 1 comments

StartContainer() has an ambiguous definition of error signaling:

  • the description (presumably) talks about returning gRPC errors (which, in my opinion, is the correct approach): https://github.com/openconfig/gnoi/blob/d04468fba8d73905e7865fcfd0076a48523f71e6/containerz/containerz.proto#L91-L97
  • but then StartContainerResponse implements its own error signaling mechanism https://github.com/openconfig/gnoi/blob/d04468fba8d73905e7865fcfd0076a48523f71e6/containerz/containerz.proto#L507-L535

This creates ambiguity which mechanism should be used. I'd suggest deprecating the latter.

Similar inband error signaling is defined in UpdateContainer RPC, although its description does not mention grpc error codes https://github.com/openconfig/gnoi/blob/d04468fba8d73905e7865fcfd0076a48523f71e6/containerz/containerz.proto#L583-L589

IMO gRPC error codes should be used throughout the service definition and all inband error signaling should be deprecated/removed

@robshakir @alshabib

LimeHat avatar Jul 23 '25 21:07 LimeHat

Thanks Sergey and thank you for spotting this. I cleaned up the spec a while back and thought I removed all instances. Would you like to send a PR for removing the error signalling in StartContainerResponse and UpdateContainerResponse?

alshabib avatar Jul 28 '25 09:07 alshabib