Skip to content

fix(sdk): validate labels in SetAnnotation to prevent retry loops #4409

@markmandel

Description

@markmandel

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.

Metadata

Metadata

Labels

area/user-experiencePertaining to developers trying to use Agones, e.g. SDK, installation, etcgood first issueThese are great first issues. If you are looking for a place to start, start here!help wantedWe would love help on these issues. Please come help us!kind/bugThese are bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions