Repository navigation
test: make TestListAutoscalerWithSDKMethods independent of deletion order - #4763
Conversation
…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>
There was a problem hiding this comment.
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.
|
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: |
nrwiersma
left a comment
There was a problem hiding this comment.
Took me a second to work out how this works, but I dont see a simpler way.
|
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: |
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