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

docs: improve counter and list example comments #3818

Merged

Conversation

yonbh
Copy link
Contributor

@yonbh yonbh commented May 10, 2024

What type of PR is this?
/kind documentation

What this PR does / Why we need it:

Some of the changes include making it more consistent between the usage of rooms or players as examples in counters and lists whenever possible.

The added documentation on https://agones.dev/site/docs/reference/fleet/ roughly matches the one on https://agones.dev/site/docs/reference/gameserver/ for consistency.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Copy link

google-cla bot commented May 10, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added kind/documentation Documentation for Agones size/S labels May 10, 2024
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 3d6f705a-0a9d-4ca4-b452-a09f064cd672

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d93a7ef3-6dc8-41c2-b6de-eceaae8c0087

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/3818/head:pr_3818 && git checkout pr_3818
  • 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.41.0-dev-a5a351b-amd64

@@ -58,11 +58,11 @@ spec:
# Which gameservers in the Fleet are most important to keep around - impacts scale down logic.
# priorities:
# - type: Counter # Sort by a “Counter”
# key: player # The name of the Counter. No impact if no GameServer found.
# order: Descending # Default is "Ascending" so smaller capacity will be removed first on down scaling.
# key: rooms # The name of the Counter. No impact if no GameServer found.
Copy link
Member

Choose a reason for hiding this comment

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

Ah good catch! Thank you! Got that in the examples.yaml, but not here.

https://github.com/googleforgames/agones/blob/main/examples/fleet.yaml has been updated with the move to beta -- but can we make the descriptions match across both (particularly the "available capacity" addition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! Changed in 1716e09.

Added the Beta information and made the descriptions in fleet.yaml and fleet.md more consistent.

# counters: # counters are int64 counters stored against a GameServer in the fleet that can be incremented and decremented by set amounts. Keys must be declared at Fleet creation time.
# games: # arbitrary key.
# count: 0 # initial value.
# capacity: 100 # (Optional) Defaults to 1000 and setting capacity to max(int64) may lead to issues and is not recommended. See GitHub issue https://github.com/googleforgames/agones/issues/3636 for more details.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# capacity: 100 # (Optional) Defaults to 1000 and setting capacity to max(int64) may lead to issues and is not recommended. See GitHub issue https://github.com/googleforgames/agones/issues/3636 for more details.
# capacity: 100

Thanks for adding the Counter and List example here - was missing!

Since this is the GameServer template, I think we can keep this pretty low on the description, since that's what the GameServer reference is for -- I'd bring this down to the level we have in https://github.com/googleforgames/agones/blob/release-1.40.0/examples/fleet.yaml

Some for the other fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed in 188f491 and made both files more consistent.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: a2eb7c5e-36bf-46e9-98d6-5704523689a5

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 2b470684-ef36-4078-8993-e13dc45693b0

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 75254938-bd73-450a-8ae8-5048d40ca623

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/3818/head:pr_3818 && git checkout pr_3818
  • 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.41.0-dev-c9bed05-amd64

@zmerlynn
Copy link
Collaborator

cc @igooch for extra eyes

# count: # Count and/or capacity must be listed (but may be nil) otherwise the counter will by dropped by the CRD schema.
# lists:
# players:
# capacity: # Capacity and/or values must be listed (but may be nil) otherwise the list will be dropped by the CRD schema.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# capacity: # Capacity and/or values must be listed (but may be nil) otherwise the list will be dropped by the CRD schema.

Matching the landing page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have now removed the verbose comments and made it match landing page with:

        players:
          values: []

# Counts and Lists provides the configuration for generic (player, room, session, etc.) tracking features.
# Now in Beta, and enabled by default
# counters:
# players:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# players:
# rooms:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has now been swapped

@@ -95,7 +100,7 @@ spec:
# Now in Beta, and enabled by default
counters:
players:
Copy link
Member

Choose a reason for hiding this comment

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

Ow, I just realised my head hurts. I thought I'd fixed this everywhere when writing https://agones.dev/site/docs/guides/counters-and-lists/ , but clearly I missed some.

What we should have in all examples and docs:

rooms - is a counter
players is a list.

Somewhere this all got messed up, with an rooms being a list, and the introduction of sessions - but the above landing page, that should be the source of truth.

Sorry to make you go back and forth - I just noticed this.

Let's stick to players and rooms and remove all else please 😄

Copy link
Contributor Author

@yonbh yonbh May 18, 2024

Choose a reason for hiding this comment

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

Hey no worries at all! Anything to make to make the docs better 🕺.

I have now removed mentions of sessions in and made rooms only used as an example as counters files e.g., fleet.yaml and gameserver.yaml in examples and fleet.md and gameserver.md in Reference.

However as a result of this examples for lists using rooms which showed initial values were also removed. If the intention of this was to show user's they are able to set initial values, I can revert this and change the wording from rooms to maybe map and initial values to be map1, map2, etc.

Screenshot 2024-05-18 at 17 57 45

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to leave in some mention of the above either in the example or the docs. The idea is to show that you can the same key in Counters as in List, that a List can have starting values, and that certain values may be nil.

Copy link
Contributor Author

@yonbh yonbh May 21, 2024

Choose a reason for hiding this comment

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

Okie dokes. As that is the intention, I have reintroduced them in gameserver.yaml in examples and gameserver.md in References since GameServer would be the source of most user's reference when viewing the docs in addition to it being linked from the CountersAndLists documentation page itself.

Commits: 07e491d, 0362020

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 6576db29-672a-484c-89f6-f1a2cd65a231

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: a55d43fe-0269-42d2-83b4-6886273e2b34

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: d0f97635-6084-4e0e-9e3a-18e8f20a701d

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 3746ba0f-c110-4992-97fb-ee961771a419

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1bae152a-2b80-4d0e-a502-90c69342e3e4

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 69a29ef8-cc01-4be1-ad9c-57776850d71f

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: f8fd9edc-08a2-450e-91b8-4f1c873a1b3e

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

Kinda just to retrigger ci
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 69f93d8f-fb98-4d5b-b044-5a0f08e1650f

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/3818/head:pr_3818 && git checkout pr_3818
  • 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.41.0-dev-a2d37c5-amd64

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

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

Could you please pull in Main and resolve some of what may be merge conflicts?

yonbh added 2 commits May 21, 2024 17:27
This reintroduce usage of rooms as a key in lists to show that it is allowed to have the same key name in between list and counters. Also readded initial values for lists as example.
@yonbh
Copy link
Contributor Author

yonbh commented May 21, 2024

Could you please pull in Main and resolve some of what may be merge conflicts?

This should be resolved now with main pulled in with latest commit of bff72b1 @igooch

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: ffefc047-1193-430d-9c49-3ab081a6ab56

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ec6ecb14-41b4-4d83-9dea-1b2c1fa5ceaf

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/3818/head:pr_3818 && git checkout pr_3818
  • 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.41.0-dev-b7497b9-amd64

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

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

LGTM

@markmandel markmandel merged commit 08039d7 into googleforgames:main May 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants