-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Let release_1_5 clientset include multiple versions of a group #35471
Let release_1_5 clientset include multiple versions of a group #35471
Conversation
Jenkins Kubemark GCE e2e failed for commit 6c75e63. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE e2e failed for commit 6c75e63. Full PR test history. The magic incantation to run this job again is |
dfc1c53
to
7cbd2c5
Compare
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.
Some comments. Additionally the deprecation part could squashed into the main parts where the codegen is changed.
|
||
func TestVersionSort(t *testing.T) { | ||
unsortedVersions := []string{"v4beta1", "v2beta1", "v2alpha1", "v3", "v1"} | ||
expected := []string{"v2alpha1", "v2beta1", "v4beta1", "v1", "v3"} |
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.
The order here doesn't seem to be correct. I'd expect following:
{"v1", "v2alpha1", "v2beta1", "v4beta1", "v3"}
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 want to keep the default referring to a stable version. (e.g., .Batch() returns v1, not v2alpha1, which is behavior before this change)
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.
@soltysh do you think it's reasonable?
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.
Discussed on slack - ok.
@@ -187,6 +188,124 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { | |||
}) | |||
}) | |||
|
|||
func observeJobCreation(w watch.Interface) { |
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.
observeScheduledJobCreation
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.
OT: instead of having multiple observe* why not having single generic function doing this, especially you're using watch.Interface
as an argument.
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.
Ack.
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.
Done. Combined the functions.
|
||
var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { | ||
f := framework.NewDefaultFramework("clientset") | ||
It("should create v2alpha1 scheduleJobs, delete scheduleJobs, watch scheduleJobs", func() { |
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.
This is a good specific test to watch for regression in the 1.5 clientset. Nice job.
A more general test of this functionality would be good eventually, but seems like a big project.
LGTM once you address soltysh changes. |
0f68c3c
to
8ba6391
Compare
Squashed and addressed the comments. Self apply the lgtm. Thank you for the quick review for a monster PR. |
Jenkins GKE smoke e2e failed for commit 8ba6391a72e0d7ae8fee922bce4ac93cbd76c57b. Full PR test history. The magic incantation to run this job again is |
8ba6391
to
0e15b0e
Compare
I thought this was intended to drop after code freeze. This seems enormously disruptive for things working toward code freeze. |
@liggitt client-go currently passively copy the contents from the main repo, we don't develop in client-go. I need this PR to go in so that during code freeze I can have a client-go that's in the right shape for the migration. By "disruptive" do you mean it will cause people to rebase? It shouldn't. I keep the original method like "Batch()", which returns the same interface as it used to do. |
BTW Given the scope of this PR I recommend you consider bumping up the priority. |
9762c5d
to
6c691e9
Compare
I'll add the milestone. The PR shouldn't cause many conflicts. Most changes are import lines. |
@k8s-bot node e2e test this |
update client-gen to use the term "internalversion" rather than "unversioned"; leave internal one unqualified; cleanup client-gen
6c691e9
to
850729b
Compare
Got conflict in test_owners.csv again. This is too much. I'm bumping the priority. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Jenkins GCE Node e2e failed for commit 850729b. Full PR test history. The magic incantation to run this job again is |
@k8s-bot node e2e test this |
Automatic merge from submit-queue |
ScheduleJob is not enabled on gke. So gke tests are failing now. I'll send a fix soon. |
Sent #35855. |
Fix #35237
This PR make versioned clientset to include multiple versions of a group. Currently only
batch
hasv1
andv2alpha1
. The clientset interface now looks like:Commit "update client-gen to say internalversion rather than unversioned" fixes #24481.
cc @kubernetes/sig-api-machinery @soltysh @deads2k @nikhiljindal
This change is