googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6.12k stars 818 forks source link

sdkserver: add functionality to remove game server annotations #3834

Open antiphp opened 6 months ago

antiphp commented 6 months ago

Is your feature request related to a problem? Please describe. When the game server resets itself, e.g. from being allocated back to ready, it is required to reset exposed information like annotations too.

Describe the solution you'd like I suggest to implement a function for the sdk server to remove an annotation. The recommended way to expose information from the game server is among others setting annotations (https://agones.dev/site/docs/faq/#how-can-i-expose-information-from-my-game-server-binary-to-an-external-service). This should include removing a previously set annotation.

Describe alternatives you've considered Overriding with empty string.

Additional context Related code: https://github.com/googleforgames/agones/blob/v1.43.0/pkg/sdkserver/sdkserver.go#L582

antiphp commented 2 months ago

Accepting an empty string to delete the annotation would be BC, so this must be separate function.

Would open a PR if or when #3835 has been resolved.

github-actions[bot] commented 1 month ago

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '