agones icon indicating copy to clipboard operation
agones copied to clipboard

Adds Counters and Lists to CSharp SDK

Open igooch opened this issue 1 year ago • 18 comments

What type of PR is this?

/kind feature

What this PR does / Why we need it:

Adds the C# SDK for Counters and Lists as part of the CountsAndLists feature.

Methods Implemented are based on the Go SDK methods in https://github.com/googleforgames/agones/blob/main/sdks/go/alpha.go:

  • func (a *Alpha) GetCounterCount(key string) (int64, error) -> Task<long> GetCounterCountAsync(string key);

  • func (a *Alpha) IncrementCounter(key string, amount int64) (bool, error) -> Task<bool> IncrementCounterAsync(string key, long amount);

  • func (a *Alpha) DecrementCounter(key string, amount int64) (bool, error) -> Task<bool> DecrementCounterAsync(string key, long amount);

  • func (a *Alpha) SetCounterCount(key string, amount int64) (bool, error) -> Task<bool> SetCounterCountAsync(string key, long amount);

  • func (a *Alpha) GetCounterCapacity(key string) (int64, error) -> Task<long> GetCounterCapacityAsync(string key);

  • func (a *Alpha) SetCounterCapacity(key string, amount int64) (bool, error) -> Task<bool> SetCounterCapacityAsync(string key, long amount);

  • func (a *Alpha) GetListCapacity(key string) (int64, error) -> Task<long> GetListCapacityAsync(string key);

  • func (a *Alpha) SetListCapacity(key string, amount int64) (bool, error) -> Task<bool> SetListCapacityAsync(string key, long amount);

  • func (a *Alpha) ListContains(key, value string) (bool, error) -> Task<bool> ListContainsAsync(string key, string value);

  • func (a *Alpha) GetListLength(key string) (int, error) -> Task<int> GetListLengthAsync(string key);

  • func (a *Alpha) GetListValues(key string) ([]string, error) -> Task<List<string>> GetListValuesAsync(string key);

  • func (a *Alpha) AppendListValue(key, value string) (bool, error) -> Task<bool> AppendListValueAsync(string key, string value);

  • func (a *Alpha) DeleteListValue(key, value string) (bool, error) -> Task<bool> DeleteListValueAsync(string key, string value);

Adds C# unit tests for the new methods. C# units tests can be run by navigating to agones/build and running make sdk-shell-csharp. Once in the C# shell navigate to the test folder /go/src/agones.dev/agones/sdks/csharp/test. From there use standard dotnet commands such as dotnet test --filter Counter to run the unit tests.

Adds C# conformance tests for the new methods. C# conformance tests can be run by navigating to agones/build and running make run-sdk-conformance-test-csharp.

Which issue(s) this PR fixes:

Working on #2716

Special notes for your reviewer:

igooch avatar Jan 09 '24 20:01 igooch

Build Failed :scream:

Build Id: 13535a09-4f14-4ab2-a4bc-35c8f69d4f0b

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 09 '24 21:01 agones-bot

Build Failed :scream:

Build Id: c232f224-6be3-4e5c-962c-0204879b503a

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 10 '24 00:01 agones-bot

Build Failed :scream:

Build Id: 98887958-1ee3-4108-ad2e-e9db4e7f777b

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 10 '24 19:01 agones-bot

Build Failed :scream:

Build Id: f82ba555-097b-4282-9a56-5fa374b7af25

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 10 '24 19:01 agones-bot

Build Succeeded :clap:

Build Id: 6b8d1859-a3b7-49f3-b9a0-f9ede7175f3c

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://8ec5a51-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.38.0-dev-8ec5a51-amd64

agones-bot avatar Jan 11 '24 04:01 agones-bot

Build Succeeded :clap:

Build Id: ab391311-9c52-42b9-8ebe-dbf031d484fe

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://5117703-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.38.0-dev-5117703-amd64

agones-bot avatar Jan 12 '24 01:01 agones-bot

Build Succeeded :clap:

Build Id: 86e9f86b-65c6-4530-845a-5454829682c4

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://e132cb5-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.38.0-dev-e132cb5-amd64

agones-bot avatar Jan 12 '24 04:01 agones-bot

Build Failed :scream:

Build Id: 0a1af7a6-636c-469b-bbee-3f266349ce78

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 22 '24 23:01 agones-bot

Build Succeeded :clap:

Build Id: 79a22e86-25e5-4408-b938-ba541e1db0b0

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://6fe950d-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.38.0-dev-6fe950d-amd64

agones-bot avatar Jan 23 '24 03:01 agones-bot

Build Succeeded :clap:

Build Id: cc02755a-7f15-426d-8815-da2eac3e11ba

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://bb383cf-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.38.0-dev-bb383cf-amd64

agones-bot avatar Jan 23 '24 20:01 agones-bot

Build Failed :scream:

Build Id: 3ee48fa2-a03e-44d1-9d17-41102183c0ca

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Feb 05 '24 17:02 agones-bot

Build Failed :scream:

Build Id: 82a75eec-abf4-43c6-bdb8-4fe18789199c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Feb 06 '24 22:02 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 07 '24 17:02 github-actions[bot]

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 07 '24 17:02 github-actions[bot]

Build Failed :scream:

Build Id: 41939dcc-7b02-48ae-84f9-1ee39c0b541c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Feb 07 '24 17:02 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 07 '24 17:02 github-actions[bot]

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 07 '24 18:02 github-actions[bot]

Build Succeeded :clap:

Build Id: aa43b271-0cba-4634-a68f-8f61a5d025b9

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://d401c84-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.39.0-dev-d401c84-amd64

agones-bot avatar Feb 07 '24 19:02 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 29 '24 03:02 github-actions[bot]

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Feb 29 '24 03:02 github-actions[bot]

Build Succeeded :clap:

Build Id: 5d13f1ad-0573-4153-9ad5-2d3c84a23b81

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://dfd6c03-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.39.0-dev-dfd6c03-amd64

agones-bot avatar Feb 29 '24 04:02 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 05 '24 19:03 github-actions[bot]

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 05 '24 19:03 github-actions[bot]

Build Succeeded :clap:

Build Id: 197d741b-9f50-421e-ba8d-f6c94dde07be

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

  • https://9aeb733-dot-preview-dot-agones-images.appspot.com/

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3581/head:pr_3581 && git checkout pr_3581
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.39.0-dev-9aeb733-amd64

agones-bot avatar Mar 05 '24 20:03 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 15 '24 03:03 github-actions[bot]

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 15 '24 03:03 github-actions[bot]

Build Failed :scream:

Build Id: cd69a367-8584-4a20-8bd0-67b0cc484de4

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Mar 15 '24 04:03 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 15 '24 04:03 github-actions[bot]

Build Failed :scream:

Build Id: af860d71-30c4-40f5-a05d-7762c4410d79

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Mar 15 '24 04:03 agones-bot

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

github-actions[bot] avatar Mar 15 '24 17:03 github-actions[bot]