Skip to content

test: make TestListAutoscalerWithSDKMethods independent of deletion order - #4763

Merged
markmandel merged 2 commits into
agones-dev:mainfrom
markmandel:flaky/list-autoscaler-sdk-methods
Oct 9, 2026
Merged

markmandel merged 2 commits into
agones-dev:mainfrom
markmandel:flaky/list-autoscaler-sdk-methods

Conversation

@markmandel

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug

What this PR does / Why we need it:

test: make TestListAutoscalerWithSDKMethods independent of deletion order

The test relied on Fleet Priorities choosing which GameServer is removed
on scale down. With Packed scheduling, Priorities only break ties between
GameServers on the same node, so on multi-node clusters such as GKE
Autopilot the autoscaler could remove a different GameServer and settle
on an unexpected replica count.

Apply the SDK list changes before creating the FleetAutoscaler, with
values chosen so the resulting replica count is the same regardless of
deletion order. Only send SDK messages to Ready GameServers that are not
being deleted, and assert that enough of them exist.

Which issue(s) this PR fixes:

None. This fixes a flaky e2e failure seen on the GKE Autopilot CI cluster.

Did you use AI tools in preparing this PR?:

Y.

Special notes for your reviewer:

N/A

…rder

The test relied on Fleet Priorities choosing which GameServer is removed
on scale down. With Packed scheduling, Priorities only break ties between
GameServers on the same node, so on multi-node clusters such as GKE
Autopilot the autoscaler could remove a different GameServer and settle
on an unexpected replica count.

Apply the SDK list changes before creating the FleetAutoscaler, with
values chosen so the resulting replica count is the same regardless of
deletion order. Only send SDK messages to Ready GameServers that are not
being deleted, and assert that enough of them exist.

Signed-off-by: Mark Mandel <mark@compoundtheory.com>
@github-actions github-actions Bot added kind/bug These are bugs. size/S labels Oct 2, 2026
@markmandel
markmandel requested review from a team and a balanced review from Copilot October 2, 2026 03:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The revised scenarios correctly preserve scale-up and scale-down coverage without relying on priority-based deletion order.

Review effort: Balanced
Findings: None

What changed in this PR

Makes the FleetAutoscaler SDK e2e test independent of GameServer deletion order.

Changes:

  • Applies SDK list mutations before creating the autoscaler.
  • Targets verified Ready, non-deleting GameServers.
  • Asserts aggregate list counts and stable replica outcomes.
File Description
test/​e2e/​fleetautoscaler_test.go Revises list autoscaling scenarios to avoid deletion-order assumptions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 1fe40a70-7fd2-480c-ac7c-e983a64e4a24

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/4763/head:pr_4763 && git checkout pr_4763
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.62.0-dev-594764f

@nrwiersma nrwiersma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Took me a second to work out how this works, but I dont see a simpler way.

@lacroixthomas lacroixthomas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@markmandel
markmandel enabled auto-merge (squash) October 8, 2026 22:01
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: cddf255f-d7c9-4697-b95c-782bee5eed89

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/4763/head:pr_4763 && git checkout pr_4763
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.62.0-dev-95a7184

@markmandel
markmandel merged commit c96bcd5 into agones-dev:main Oct 9, 2026
4 checks passed
@markmandel
markmandel deleted the flaky/list-autoscaler-sdk-methods branch October 9, 2026 01:19
@nrwiersma nrwiersma mentioned this pull request Oct 14, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug These are bugs. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants