docs: correct Distributed fleet scale-down order from random to oldest-first #4873
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 199 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.317
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4873"
general
weight: 0.35
markmandel
What type of PR is this?
/kind documentation
What this PR does / Why we need it:
In #4862 it was agreed that this is a docs bug, since the order has been oldest first since 0.9.0 (2019).
With the Distributed scheduling strategy, a Fleet scale down removes the oldest
ReadyGameServersfirst:sortGameServersByDistributedStrategysorts by creation timestamp in ascending order, andTestSortGameServersByDistributedStrategyexpects that order. The docs say theGameServersare removed at random, and the code comments say newest first.This PR updates the docs and the comments to match the code:
site/content/en/docs/Advanced/scheduling-and-autoscaling.md: the "Fleet Scale Down Strategy" section now says oldest first. The Counter and List priorities paragraph now says the creation timestamp tie-breaker is oldest first, and "instead of random removal" is removed.pkg/gameserversets/gameserversets.go: the comments onSortGameServersByStrategyandsortGameServersByDistributedStrategy.No behaviour change.
Which issue(s) this PR fixes:
Closes #4862
Did you use AI tools in preparing this PR?:
Y. This PR was written in part with the assistance of generative AI. I reviewed the change, ran
make -C build lint test-go, and checked the order on a kind cluster (see #4862).Special notes for your reviewer:
The docs also say that the order between
GameServerscreated within the same second is not defined, because creation timestamps have a resolution of one second.