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

Support for Unity Alpha SDK #2600

Merged
merged 9 commits into from
Jul 12, 2022
Merged

Conversation

MaxHayman
Copy link
Contributor

@MaxHayman MaxHayman commented May 27, 2022

What type of PR is this?

Uncomment only one /kind <> line, press 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:

Currently the Unity SDK does not support the player tracking features

#1905
#1677

Which issue(s) this PR fixes:

Closes #

Special notes for your reviewer:

Using AgonesAlphaSdk instead of AgonesSdk will give you access to the new alpha features. Made some methods protected to I could avoid disrupting as much of the existing code as possible.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8b1680ce-6836-4989-9ad1-814efe988508

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/googleforgames/agones.git pull/2600/head:pr_2600 && git checkout pr_2600
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.24.0-9e2066c-amd64

@MaxHayman
Copy link
Contributor Author

/assign @markmandel

Hope you don't me assigning you. You seem to have reviewed the last few unity sdk changes.

@markmandel
Copy link
Member

Thanks for this - dragging in a few people who know Unity better from Slack.

Quick review though - we will need some docs please 😄

Have a look at:
https://agones.dev/site/docs/guides/client-sdks/unity/

And also https://agones.dev/site/docs/contribute/ for details on how to edit the docs, and make sure new features only show up on release.

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

My C# is not great, but eyeballing it, things seem fine.

Just need some documentation please before merging 😄

@roberthbailey
Copy link
Member

@MaxHayman - The next release is in a week. Do you think you'll have time to add some docs so we can get this merged for the release?

@MaxHayman
Copy link
Contributor Author

MaxHayman commented Jun 14, 2022

Sorry had been quite busy. Is this okay? I wasn't sure what to put for the release gate of the content as I wasn't sure if it would make it in to the next release.

But would this work?

diff --git a/site/content/en/docs/Guides/Client SDKs/unity.md b/site/content/en/docs/Guides/Client SDKs/unity.md
index 063eecac0..af62311c3 100644
--- a/site/content/en/docs/Guides/Client SDKs/unity.md	
+++ b/site/content/en/docs/Guides/Client SDKs/unity.md	
@@ -21,6 +21,16 @@ Check the [Client SDK Documentation]({{< relref "_index.md" >}}) for more detail
 | Configuration        | Watch                    | ✔️                            | 
 | Metadata             | SetAnnotation            | ✔️                            | 
 | Metadata             | SetLabel                 | ✔️                            | 
+{{% feature expiryVersion="1.24.0" %}}
+| Player Tracking      | GetConnectedPlayers      | ❌️                            | 
+| Player Tracking      | GetPlayerCapacity        | ❌️                            | 
+| Player Tracking      | GetPlayerCount           | ❌️                            | 
+| Player Tracking      | IsPlayerConnected        | ❌️                            | 
+| Player Tracking      | PlayerConnect            | ❌️                            | 
+| Player Tracking      | PlayerDisconnect         | ❌️                            | 
+| Player Tracking      | SetPlayerCapacity        | ❌️                            | 
+{{% /feature %}}
+{{% feature publishVersion="1.24.0" %}}
 | Player Tracking      | GetConnectedPlayers      | ✔️                            | 
 | Player Tracking      | GetPlayerCapacity        | ✔️                            | 
 | Player Tracking      | GetPlayerCount           | ✔️                            | 
@@ -28,6 +38,7 @@ Check the [Client SDK Documentation]({{< relref "_index.md" >}}) for more detail
 | Player Tracking      | PlayerConnect            | ✔️                            | 
 | Player Tracking      | PlayerDisconnect         | ✔️                            | 
 | Player Tracking      | SetPlayerCapacity        | ✔️                            | 
+{{% /feature %}}
 
 Additional methods have been added for ease of use:
 
@@ -119,6 +130,8 @@ configuration changes.
 agones.WatchGameServer(gameServer => Debug.Log($"Server - Watch {gameServer}"));
 ```
 
+{{% feature publishVersion="1.24.0" %}}
+
 ## Player Tracking
 
 {{< alpha title="Player Tracking" gate="PlayerTracking" >}}
@@ -191,6 +204,8 @@ This returns a list of the playerIDs that are currently connected to the GameSer
 List<string> players = await agones.GetConnectedPlayers();
 ```
 
+{{% /feature %}}
+
 
 {{% alert title="Warning" color="warning"%}}
 The following code causes deadlock. Do not use a `Wait` method with the returned Task.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 7f21d4c8-aeb5-494a-a99e-ac40e64aca56

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

@markmandel
Copy link
Member

Sorry had been quite busy. Is this okay? I wasn't sure what to put for the release gate of the content as I wasn't sure if it would make it in to the next release.

All good! We all hit busy times 👍🏻

Yeah, we might need to skip this for this release, since the above isn't in your PR, but the overall structure looks good.

Only thing I can think of without it getting built - often you'll need to duplicate the entire table between feature publish and expiry shortcodes, since doing it in the middle messes up the markdown parsing.

But give it go on the PR, and we can preview and adjust as needed.

@MaxHayman
Copy link
Contributor Author

Sorry had been quite busy. Is this okay? I wasn't sure what to put for the release gate of the content as I wasn't sure if it would make it in to the next release.

All good! We all hit busy times 👍🏻

Yeah, we might need to skip this for this release, since the above isn't in your PR, but the overall structure looks good.

Only thing I can think of without it getting built - often you'll need to duplicate the entire table between feature publish and expiry shortcodes, since doing it in the middle messes up the markdown parsing.

But give it go on the PR, and we can preview and adjust as needed.

Applied and wrapped it around the whole table!

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 0363e8cd-6fca-47be-a957-2405cade0a7d

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/googleforgames/agones.git pull/2600/head:pr_2600 && git checkout pr_2600
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.tag=1.24.0-f6b8bd5-amd64

@SaitejaTamma SaitejaTamma added the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Jun 14, 2022
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Thanks for doing this work! One small tweak, and a rendering issue I haven't seen before.

site/content/en/docs/Guides/Client SDKs/unity.md Outdated Show resolved Hide resolved
@SaitejaTamma SaitejaTamma removed the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Jun 22, 2022
MaxHayman and others added 3 commits July 7, 2022 09:55
Co-authored-by: Mark Mandel <markmandel@google.com>
Co-authored-by: Mark Mandel <markmandel@google.com>
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 0710caa5-6e63-4da1-bfb5-8ac65b7f91ed

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ae06f2ec-4d6a-40ca-84a0-5d7fdbf4b2ea

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/googleforgames/agones.git pull/2600/head:pr_2600 && git checkout pr_2600
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.tag=1.25.0-a464a65-amd64

Had to wrangle the formatting of the alpha shortcode to
handle shortcode in shortcode rendering, and also updated everything to 1.25.0.
@markmandel
Copy link
Member

Took me a minute to work out what the issue was the with the shortcode formatting - so I sent you a PR to your PR 😄 it's a bit of a hacky, fix, but it works.

FreejamGames#1

Also noted moving everything to 1.25.0.

I can't update your branch to main (because you are on a org repo, it's a weird github rule - unless you can find a way to give me rights to add commits to your branch) - if you could merge my PR, rebase against main, I'm happy to approve and merge.

image

(I thought about adding the rebase to the PR, but I figured that would end up quite confusing).

Thanks for your patience on this one!

@google-oss-prow google-oss-prow bot added the lgtm label Jul 9, 2022
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markmandel, MaxHayman

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:

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: e5e06d1a-cd20-47e1-af07-cc3e6b90442b

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/googleforgames/agones.git pull/2600/head:pr_2600 && git checkout pr_2600
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.tag=1.25.0-d909edd-amd64

@markmandel
Copy link
Member

Looks perfect - if you can rebase against main please, I can merge this in 👍🏻

Context: https://github.com/orgs/github-community/discussions/5634

@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@google-oss-prow google-oss-prow bot removed the lgtm label Jul 12, 2022
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: f161b524-ad45-4139-bfbe-f880e95813f9

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/googleforgames/agones.git pull/2600/head:pr_2600 && git checkout pr_2600
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.tag=1.25.0-fc6a7da-amd64

@markmandel markmandel merged commit 73cdabc into googleforgames:main Jul 12, 2022
@markmandel
Copy link
Member

We got it done!

@SaitejaTamma SaitejaTamma added the kind/feature New features for Agones label Jul 26, 2022
@SaitejaTamma SaitejaTamma added this to the 1.25.0 milestone Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved kind/feature New features for Agones size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants