-
Notifications
You must be signed in to change notification settings - Fork 898
fix(sdk): validate labels in SetAnnotation to prevent retry loops #4409
Description
This is the same as #4385 but for SetAnnotations vs SetLabel
Is your feature request related to a problem? Please describe.
When attempting to submit an invalid Annotation with the REST API. rather than returning a failure response the client SDK will enter an infinite loop of attempting to submit the label without any additional output unless debug logging is enabled, this also disables further creation of labels.
Describe the solution you'd like
Simple failure responses in the form of 400 or 500 response codes with a simple JSON body stating success or failure along with the attempted Annotation key and value.
Describe alternatives you've considered
I did briefly consider monitoring the labels but considering the loop knocks out the set annotation feature it would be a bit moot, could also force restart the client sdk sidecar somehow but I'm not sure if that will break anything upstream when considering health checking.