-
Notifications
You must be signed in to change notification settings - Fork 826
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
Don't move Dev GameServer back to Ready always #2545
Don't move Dev GameServer back to Ready always #2545
Conversation
Build Succeeded 👏 Build Id: 90e7de24-cd40-4cf0-b04b-eaeb808bcb37 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:
|
Build Succeeded 👏 Build Id: 81eb1ef1-e2a7-47a5-81d1-c37af7e23c4c 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:
|
Build Failed 😱 Build Id: 64d8b624-a1b1-4be3-bb67-a3368af22166 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Looks like AWS has moved their examples around again
|
pkg/gameservers/controller.go
Outdated
c.loggerForGameServer(gs).Debug("GS is a development game server and will not be managed by Agones.") | ||
// Only move from Creating -> Ready. Other manual state changes are up to the end user. | ||
// We also don't want to move from Allocated -> Ready every time someone allocates a GameServer. | ||
if !(gs.Status.State == agonesv1.GameServerStateCreating) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason that this isn't if gs.Status.State != agonesv1.GameServerStateCreating { ... }
? The way it's currently written is difficult for my brain to parse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a really good point. I was just copying the original format, but yeah - I'll make this change.
There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes googleforgames#2536
7c60cdb
to
d93c763
Compare
Build Succeeded 👏 Build Id: e1d192a2-606d-4ef8-bcab-30eeac699fc4 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:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, roberthbailey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Don't move Dev GameServer back to Ready always There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes googleforgames#2536 * Review updates.
What type of PR is this?
/kind bug
What this PR does / Why we need it:
There was a bug in the implementation of the local development GameServer that would always move a
GameServer
toReady
any time the state was not currentlyReady
.This meant if you tried to Allocate the
GameServer
, the controller would immediately move it back to beingReady
.This fix locks down that the only path that the controller should affect is moving from
Creating
state toReady
. This allows the end user to manually manage state on theGameServer
as they desire.Which issue(s) this PR fixes:
Closes #2536
Special notes for your reviewer: