-
Notifications
You must be signed in to change notification settings - Fork 829
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
Update client-go to support Kubernetes 1.18.0 #1998
Update client-go to support Kubernetes 1.18.0 #1998
Conversation
3869494
to
ca7f411
Compare
Build Failed 😱 Build Id: 66932ce7-89d2-48af-905c-d01364034762 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Passed locally, looks like a flake that failed on the secret update (that's a new one): if _, err := kubeCore.Secrets(agonesSystemNamespace).Update(ctx, s, metav1.UpdateOptions{}); err != nil {
t.Fatalf("updating secrets failed: %s", err)
}
`` |
Build Failed 😱 Build Id: 101d9a53-0474-4c55-975d-e08b7ae72f9d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Oh same thing - seems like the new client-go is causing this. I can fix it though. |
Oh I know what it is, I made the tests parallel. |
Build Failed 😱 Build Id: cddc8827-8c6a-40e4-8dc8-fdfdaf7327fd To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
dad0158
to
4307f90
Compare
Build Failed 😱 Build Id: 555807a0-9693-40c9-8090-69dba1070cc7 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
🤔 |
Build Failed 😱 Build Id: 59b0c456-9534-4b5a-bde4-4a9d04114c6d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Hrmn. Seems consistent in e2e tests. |
4307f90
to
25da474
Compare
Build Failed 😱 Build Id: 4d0bb1c0-b516-45ad-a7fe-b0d5f12cab83 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: f1712374-6324-4924-86f4-73e849e0312e To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Running into every flake and issue ever apparently today. |
Build Failed 😱 Build Id: 8b993311-89ab-4cbe-a378-e3646554bf44 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Looks like SDK conformance tests are failing reasonably(?) consistently. Will attempt to replicate locally. |
Ah. Small problem. If you pass |
25da474
to
5138e05
Compare
Build Failed 😱 Build Id: 01d9f28b-d297-44f9-8aa5-7bf7b09abca9 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
5138e05
to
b8b5d29
Compare
Build Succeeded 👏 Build Id: cd48ce89-7fc5-48f9-9e54-caa7b95e00d0 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: 4a92bf04-2551-4251-ba21-19deb83db330 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:
|
I just realised I didn't add a note - but this is good to review now. I worked out the failures. |
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.
Well done on making this humongous change. 8)
if err := allocator.Start(stop); err != nil { | ||
kubeInformerFactory.Start(ctx.Done()) | ||
agonesInformerFactory.Start(ctx.Done()) | ||
if err := allocator.Start(ctx); err != nil { |
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.
ctx.Done?
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.
Because the allocator has to go all the way down to client-go to allocate a GameServer, we have to pass the ctx all the way through.
And it also means the API for all systems is the same all the way through.
It's also possible that allocation.Start(...)
should be changed to allocation.Run(...)
to match all the other modules in Agones, hence the weirdness in the API surface, so I totally get the comment.
time.Sleep(time.Duration(ctlConf.Timeout) * time.Second) | ||
close(timedStop) | ||
}() | ||
ctx, cancel = context.WithTimeout(ctx, time.Duration(ctlConf.Timeout)*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.
Nice.
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 liked this one too 😄
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, pooneh-m 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 |
client-go and related libraries moved to version v0.18.15 This does not include a regeneration of Agones CRD clients.
This includes the breaking change that client-go now required a context.Context as well as an Option struct on all API requests.
e2e tests have now been refactored to match the new client-go API surface.
This commit does two things: 1. Switch from using a `stop` channel to a context.Context throughout the codebase. 2. Use this new Context to accommodate the new client-go API surface and generated clients. The vast majority of this commit is implementing the new api surface, but areas to highlight for functionality changes: - /pkg/util/ folder, especially the workerqueue implementation - /cmd/sdk-server as the new context.Context simplified the timeout functionality. Work on googleforgames#1971
- Allocation tests need to be serial, so they can refresh the client/server certificate. - Just in case, implement retry on creating the secret. - Fixes for flaky TestGameServerReadyAllocateReady - Fix bug in sdkserver local timeout.
49cf193
to
6f2aa50
Compare
New changes are detected. LGTM label has been removed. |
Build Failed 😱 Build Id: 3d6ae0c5-299a-4eec-8cc6-9b9b8075955d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
That's a new flake. |
Build Failed 😱 Build Id: 086e95ba-0fb6-4c65-8c3b-ed6df40e2400 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
That's a new flake too
|
Build Succeeded 👏 Build Id: 5fd5a676-9a4a-4043-ae45-58ab6a597798 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 breaking
What this PR does / Why we need it:
This PR covers:
stop
channel to a context.Context throughout the codebase.These changes are due to the breaking change that client-go now required a context.Context as well as an Option struct on all API requests.
The vast majority of this commit is implementing the new api surface, but areas to highlight for functionality changes:
Which issue(s) this PR fixes:
Work on #1971
Special notes for your reviewer:
I AM SO SORRY FOR THIS PR 😭. It's massive, and unwieldy, but I couldn't see any way to do this in pieces, as the changes in client-go touch everything.
Please check the commit comments, I tried to break it apart by commits, so that it would be easier to review.