Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Allocator service to return 400+ http status for failure #1040

Closed
pooneh-m opened this issue Sep 5, 2019 · 1 comment · Fixed by #1516
Closed

Proposal: Allocator service to return 400+ http status for failure #1040

pooneh-m opened this issue Sep 5, 2019 · 1 comment · Fixed by #1516
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/breaking Breaking change kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Milestone

Comments

@pooneh-m
Copy link
Contributor

pooneh-m commented Sep 5, 2019

Is your feature request related to a problem? Please describe.
When allocating a game server, if there is an issue that the game server cannot be allocated, the allocator service response is 200 http status with the state of either "unallocated" or "contention". For a RESTful API, the http status represents the status of the result and receiving 200 for an unsuccessful response is contradicting. In kubernetes world, status is a good representation of the state of a CRD, but this is not be the standard for REST APIs.

Describe the solution you'd like
The allocation REST API should return a meaningful http status in case of failure instead of 200. My proposal is to return 429 http status (ResourceExhausted grpc code) for unallocated state and 409 for contention.

@pooneh-m pooneh-m added the kind/feature New features for Agones label Sep 5, 2019
@markmandel
Copy link
Member

So I didn't realise that gRPC has codes that translate to HTTP Status codes through the grpc-gateway.

I think that was the blocking issue in my mind - but now I realise this, I'm 100% on board.

@markmandel markmandel added kind/design Proposal discussing new features / fixes and how they should be implemented area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc labels Sep 5, 2019
@markmandel markmandel added the kind/breaking Breaking change label May 6, 2020
@markmandel markmandel added this to the 1.6.0 milestone Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/breaking Breaking change kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants