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

Add PlayerTracking IDs to SDK Convert function #1498

Merged
merged 3 commits into from
Apr 29, 2020

Conversation

markmandel
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug
/kind cleanup
/kind documentation

/kind feature

/kind hotfix

What this PR does / Why we need it:

When converting from CRD->gRPC model for SDK.GetGameServer(), add the Player Tracking IDs

Which issue(s) this PR fixes:

Work on #1033

Special notes for your reviewer:

None

When converting from CRD->gRPC model, add the Player Tracking IDs

Work on googleforgames#1033
@markmandel markmandel added kind/feature New features for Agones area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc labels Apr 25, 2020
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8f728926-22dc-4e53-bfec-87d77de38b53

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):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1498/head:pr_1498 && git checkout pr_1498
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-44247b7

@markmandel markmandel requested review from roberthbailey and aLekSer and removed request for cyriltovena April 28, 2020 15:41
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5faea94d-3c58-4ac0-8ad2-b44f3da54668

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):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1498/head:pr_1498 && git checkout pr_1498
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-adb1fd0


sdkGs := convert(gs)
eq(t, fixture, sdkGs)
assert.Zero(t, sdkGs.ObjectMeta.DeletionTimestamp)
assert.Equal(t, gs.Status.Players.Capacity, sdkGs.Status.Players.Capacity)
assert.Equal(t, gs.Status.Players.Count, sdkGs.Status.Players.Count)
assert.Equal(t, gs.Status.Players.IDs, sdkGs.Status.Players.IDs)
Copy link
Collaborator

@aLekSer aLekSer Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in the future there is a need to disable (reset) featureGates after this and similar tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually by design. This let's us randomly test out various areas of the code with Feature flags both on and off, and find errors -- it's already found one 😃

When setting feature flags at the beginning of a Test, it overwrites all feature flags, so you know you have the desired state at that point.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for an explanation, just was curious what was expected here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also why we have the runtime.FeatureTestMutex.Lock() in place, so that Feature Flag'd tests can't interfere with each other.

I found in my testing of this, you actually can't rely on removing t.Parrallel, as without it, go test runs the tests in that file in serial, but each file becomes its own executable, and they are run in parallel, and everything becomes hard at that point.

Copy link
Collaborator

@aLekSer aLekSer Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this might also be reasonable to test some combinations of featureFlags.

Copy link
Collaborator

@aLekSer aLekSer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, left one comment for the future tests of FeatureGates. We probably need to have a function to reset all FeatureGates. Otherwise they can interfere each other in one tests.
Note that test is declared as t.Parallel().

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, markmandel, roberthbailey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [markmandel,roberthbailey]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 86ddef6f-89d0-4b53-ae99-70af64a6988c

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):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1498/head:pr_1498 && git checkout pr_1498
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-cbbf616

@aLekSer aLekSer merged commit cac6182 into googleforgames:master Apr 29, 2020
@markmandel markmandel deleted the feature/player-ids-convert branch April 29, 2020 23:34
@markmandel markmandel added this to the 1.6.0 milestone May 19, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
When converting from CRD->gRPC model, add the Player Tracking IDs

Work on googleforgames#1033

Co-authored-by: Alexander Apalikov <alexander.apalikov@globant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones lgtm size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants