Skip to content

[Unreal] Add counters support to status#4333

Merged
markmandel merged 4 commits intoagones-dev:mainfrom
GloryOfNight:feature/add-status-counters
Nov 24, 2025
Merged

[Unreal] Add counters support to status#4333
markmandel merged 4 commits intoagones-dev:mainfrom
GloryOfNight:feature/add-status-counters

Conversation

@GloryOfNight
Copy link
Copy Markdown
Contributor

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
/kind release

What this PR does / Why we need it:

  • add counter structure to status
  • fix spaces to tabs

Which issue(s) this PR fixes:

n/a

Special notes for your reviewer:
Recently we introduced that change internally, just wanted to share.

@github-actions github-actions bot added kind/feature New features for Agones size/S labels Nov 12, 2025
@GloryOfNight
Copy link
Copy Markdown
Contributor Author

sorry, forgot to attach the file 😓
build.log

@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

@markmandel
Copy link
Copy Markdown
Collaborator

@keith-miller may I have your eyes on this?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for counters in the Unreal SDK's status structure and fixes whitespace formatting issues by converting spaces to tabs for consistency with the codebase style.

Key changes:

  • Added new FCounter struct to represent counter objects with Count and Capacity fields
  • Integrated counters map into FStatus struct to parse counter data from JSON responses
  • Fixed whitespace formatting in AgonesSubsystem.cpp by replacing spaces with tabs

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.

File Description
sdks/unreal/Agones/Source/Agones/Classes/Classes.h Adds FCounter struct definition and integrates TMap<FString, FCounter> into FStatus; fixes tab indentation in FCounterResponse
sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp Replaces trailing spaces with tabs in lambda functions for GetList, UpdateList, AddListValue, and RemoveListValue methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +201 to +204
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Count = 0;

UPROPERTY(BlueprintReadOnly, Category = "Agones")
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file (see lines 27, 30, 179, 182, 223, 226, etc.).

Suggested change
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Count = 0;
UPROPERTY(BlueprintReadOnly, Category = "Agones")
UPROPERTY(BlueprintReadOnly, Category="Agones")
int32 Count = 0;
UPROPERTY(BlueprintReadOnly, Category="Agones")

Copilot uses AI. Check for mistakes.
Comment on lines +201 to +204
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Count = 0;

UPROPERTY(BlueprintReadOnly, Category = "Agones")
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file.

Suggested change
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Count = 0;
UPROPERTY(BlueprintReadOnly, Category = "Agones")
UPROPERTY(BlueprintReadOnly, Category="Agones")
int32 Count = 0;
UPROPERTY(BlueprintReadOnly, Category="Agones")

Copilot uses AI. Check for mistakes.
UPROPERTY(BlueprintReadOnly, Category="Agones")
TArray<FPort> Ports;

UPROPERTY(BlueprintReadOnly, Category = "Agones")
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file.

Suggested change
UPROPERTY(BlueprintReadOnly, Category = "Agones")
UPROPERTY(BlueprintReadOnly, Category="Agones")

Copilot uses AI. Check for mistakes.
Comment on lines +202 to +205
int32 Count = 0;

UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Capacity = 0;
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

Type inconsistency: FCounter uses int32 for Count and Capacity, while FCounterResponse (lines 466, 469) uses int64 for the same fields. These structures represent similar counter data and should use consistent types. Consider using int64 to match FCounterResponse and avoid potential truncation issues.

Suggested change
int32 Count = 0;
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int32 Capacity = 0;
int64 Count = 0;
UPROPERTY(BlueprintReadOnly, Category = "Agones")
int64 Capacity = 0;

Copilot uses AI. Check for mistakes.
@markmandel
Copy link
Copy Markdown
Collaborator

Copilot is nitpicky! 😁

Copy link
Copy Markdown
Contributor

@keith-miller keith-miller left a comment

Choose a reason for hiding this comment

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

lgtm

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: fc52eb74-046c-4011-b01b-92a4ec72d247

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/4333/head:pr_4333 && git checkout pr_4333
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.54.0-dev-53d713d

@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

@markmandel
Copy link
Copy Markdown
Collaborator

lgtm

Thank you @keith-miller ! - if you aren't careful you'll rack up enough reviews to become an approver on Agones 😁
(completely not subtle prompting 😄 )

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: ee21cb2e-99f9-48f8-8365-7241eaece51c

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/4333/head:pr_4333 && git checkout pr_4333
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.54.0-dev-336628b

Copy link
Copy Markdown
Collaborator

@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.

let's go.

@markmandel markmandel enabled auto-merge (squash) November 23, 2025 22:36
@igooch
Copy link
Copy Markdown
Collaborator

igooch commented Nov 24, 2025

/gcbrun

@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

rofl, I forgot to run it

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: ca726a69-81b6-40b8-93a6-6e1aa6a8b572

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/4333/head:pr_4333 && git checkout pr_4333
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.54.0-dev-57d64b1

@markmandel markmandel merged commit 34e1be4 into agones-dev:main Nov 24, 2025
4 checks passed
mnthe pushed a commit to mnthe/agones that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New features for Agones size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants