GithubHelp home page GithubHelp logo

Comments (6)

markmandel avatar markmandel commented on September 7, 2024

One possible extra wrinkles - it may need to be grpc status codes, such as what you see here:
https://pkg.go.dev/google.golang.org/grpc/codes#pkg-types

See:

https://github.com/grpc-ecosystem/grpc-gateway/blob/b9de2f20010f706d6efd4b726daa2746a017cb37/runtime/errors.go#L36-L77

For the mappings.

from agones.

Kalaiselvi84 avatar Kalaiselvi84 commented on September 7, 2024

Shall I work on this task?

from agones.

markmandel avatar markmandel commented on September 7, 2024

@Kalaiselvi84 sounds good!

from agones.

Kalaiselvi84 avatar Kalaiselvi84 commented on September 7, 2024

Could you please confirm if the following steps are the correct approach?

  1. Add new entry[HTTP_STATUS_UNALLOCATED] under the allocator section in the values.yaml.

  2. Reflect the new env variable in the allocation.yaml.

  3. Implement a function to fetch the code from the env variable[HTTP_STATUS_UNALLOCATED] in the converter.go file.

  4. Use helm upgrade to deploy the changes.

from agones.

markmandel avatar markmandel commented on September 7, 2024

Add new entry[HTTP_STATUS_UNALLOCATED] under the allocator section in the values.yaml.

I'm thinking something like:

agones.allocator.service.http.unallocatedStatus ?

Since I think that would be the right nesting and semantic position.

And then yes, that would need to be arg passed into the Allocator Service.

Implement a function to fetch the code from the env variable[HTTP_STATUS_UNALLOCATED] in the converter.go file.

You can extend the existing viper code to do the parsing. By default it should be http code 429 as it is now, if it's not set.

I think we'll have to be clear in the docs, that we are specifying which gRPC status to return. which is defined here (best reference I could find), and shows how gRPC codes are matched to HTTP codes :

https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L32-L185

🤔 there's an interesting question on how we can e2e test this without some kind of custom install. Will need to think on that one.

from agones.

markmandel avatar markmandel commented on September 7, 2024

Just reopening, as I noticed the PR has no docs 😄

Can we add some docs to the Helm configuration page please?

from agones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.