-
Notifications
You must be signed in to change notification settings - Fork 831
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
Test in place upgrades run tests #3991
Conversation
The sdk-client-test requires pre-existing Counter and List values when CountsAndLists is enabled, and a game server cannot be applied with a Counter or List value when CountsAndLists is not enabled.
Build Failed 😭 Build Id: 8699fd0e-6194-4109-b397-5419d75b2fd9 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
and cleans up resources on delete
89b7238
to
cc8e2b2
Compare
@@ -105,6 +105,9 @@ func main() { | |||
testLists(sdk) | |||
} | |||
|
|||
// Delay before shutdown to prevent Game Servers from churning too quickly on a running cluster | |||
time.Sleep(8 * time.Second) |
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.
How is this value decided? Just curious whether make it configurable can make it easy to use.
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.
From manually testing different values. 5 seconds led to more unhealthy game servers, and same for 10 seconds. It would be nice to have it configurable, but that might be hard to do since the sdk-client-test
binary is built at a release version (1.38, 1.39, etc.), and not at run time.
test/upgrade/main.go
Outdated
@@ -337,3 +370,96 @@ func createGameServerFile(agonesVersion string) string { | |||
|
|||
return gsPath | |||
} | |||
|
|||
// Create a game server every ten seconds until the context is cancelled. The game server container |
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.
Do you have a sense how many gameservers are created for each Agones version?
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.
It takes ~1 min to install Agones, so ~60 sec / 10 sec per version. We can certainly up that value (I had it at 5 sec on an earlier iteration).
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.
I put it back at create every 5 sec, and also added in wait time at each version to increase number game servers created.
Build Succeeded 🥳 Build Id: 35d028e2-39bf-4f47-928b-ccf9fceb8149 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: 553e3dd2-2a5e-4d1b-9f23-9d2f030131b7 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:
|
log.Fatal("Not able to create AddEventHandler", err) | ||
} | ||
|
||
go podInformer.Run(stopCh) |
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.
I still don't quite get the usage of the stopCh
here. Seems no one is sending signal to stopCh, so this line is equal to go podInformer.Run()
? If so when does this go routine get stopped?
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.
It's a required paramenter for the .Run() function. I think it's used instead of context.Context to stop the informer anywhere in the code. We don't use it since we want the informer to run until the main thread completes.
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.
Oh I see, I thought it's optional :)
Build Succeeded 🥳 Build Id: a3b534b5-8026-4f70-b401-7f076895c384 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 feature
What this PR does / Why we need it:
sdk-client-test
through Agones upgrades. The test fails if too many Game Servers end up in a CrashBackOff loop. It is expected that 0-2 Game Servers per version will not be healthy, as the first Game Server created immediately following an Agones installation may fail due to the cluster not being scaled up.sdk-client-test
must have this Counter and List defined in the Game Server when CountsAndLists is enabled, and the Game Server cannot be applied to a cluster if a Counter or List is defined and CountsAndLists is not enabled.Which issue(s) this PR fixes:
Working on #3795
Special notes for your reviewer:
The
us-docker.pkg.dev/agones-images/ci/sdk-client-test
still needs to be created, and have thesdk-client-test
built at each release version noted in the versionMap and pushed to the new repo.