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

Node.js CountsAndLists SDK implementation and conformance tests #3645

Closed
igooch opened this issue Feb 13, 2024 · 3 comments · Fixed by #3726
Closed

Node.js CountsAndLists SDK implementation and conformance tests #3645

igooch opened this issue Feb 13, 2024 · 3 comments · Fixed by #3726
Labels
help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones

Comments

@igooch
Copy link
Collaborator

igooch commented Feb 13, 2024

Arbitrary Counters and Lists for GameServers, SDKs and Allocation #2716 has been released in Alpha, and is looking for a contributor with Node.js experience to implement the Node.js SDK. The SDK methods to implement are listed in #2716, and have been implemented in Go https://github.com/googleforgames/agones/blob/main/sdks/go/alpha.go:

  • func (a *Alpha) GetCounterCount(key string) (int64, error)
  • func (a *Alpha) IncrementCounter(key string, amount int64) (error)
  • func (a *Alpha) DecrementCounter(key string, amount int64) (error)
  • func (a *Alpha) SetCounterCount(key string, amount int64) (error)
  • func (a *Alpha) GetCounterCapacity(key string) (int64, error)
  • func (a *Alpha) SetCounterCapacity(key string, amount int64) (error)
  • func (a *Alpha) GetListCapacity(key string) (int64, error)
  • func (a *Alpha) SetListCapacity(key string, amount int64) (error)
  • func (a *Alpha) ListContains(key, value string) (bool, error)
  • func (a *Alpha) GetListLength(key string) (int, error)
  • func (a *Alpha) GetListValues(key string) ([]string, error)
  • func (a *Alpha) AppendListValue(key, value string) (error)
  • func (a *Alpha) DeleteListValue(key, value string) (error)

The Node.js SDK should be implemented in the https://github.com/googleforgames/agones/tree/main/sdks/nodejs directory, and should also contain unit tests. Navigating to agones/build and running make sdk-shell-node may be helpful when running unit tests.

The protocol buffer definitions for these SDK methods are in https://github.com/googleforgames/agones/tree/main/sdks/nodejs/lib/alpha. Note that the proto methods do not exactly match the above listed SDK methods. This is due to the difference between the design in #2716 and the Google AIP https://google.aip.dev/general guidance that the proto follows as closely as possible.

Conformance tests should be implemented in the https://github.com/googleforgames/agones/tree/main/test/sdk/nodejs directory. Note that the conformance tests use the Local SDK Server. Node.js conformance tests can be run by navigating to agones/build and running make run-sdk-conformance-test-node. The conformance test https://github.com/googleforgames/agones/blob/main/build/includes/sdk.mk will need to be updated to take in the ALPHA_FEATURE_GATES, and the COUNTS_AND_LISTS_TESTS.

@igooch igooch added kind/feature New features for Agones help wanted We would love help on these issues. Please come help us! labels Feb 13, 2024
@igooch
Copy link
Collaborator Author

igooch commented Mar 5, 2024

@steven-supersolid if you or someone on your team has the time

@steven-supersolid
Copy link
Collaborator

I'm happy to take this on

@steven-supersolid
Copy link
Collaborator

I've done counters + unit tests and will next move on to lists, the nodejs example server, conformance tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants