-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Removed scheduler dependencies to testapi. #48405
Conversation
And also check other components, no dependency to
|
) | ||
|
||
func init() { | ||
if apiMediaType := os.Getenv("KUBE_TEST_API_TYPE"); len(apiMediaType) > 0 { |
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.
no sure whether we need such logic for scheduler; in scheduler, we only need to check against v1
.
/retest |
return fmt.Sprintf("/api/%s/%s", g.externalGroupVersion.Version, resource) | ||
} | ||
return fmt.Sprintf("/api/%s/%s/%s", g.externalGroupVersion.Version, resource, name) | ||
} else { |
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.
if block ends with a return statement, so drop this else and outdent its block?
/retest |
/retest |
@bsalamat , any suggestion? |
@kubernetes/sig-scheduling-pr-reviews |
@k82cn So, the new testutil.go file is just a copy/paste of pieces of testapi.go. Generally speaking, we should avoid duplicating code as much as we can. What necessitates this duplication? |
This's part of #44188 , we should only dependent on client-go, k8s.io/api or other 3rd part lib; and |
In that case, LGTM. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, k82cn Associated issue: 44188 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
/test pull-kubernetes-e2e-kops-aws |
@@ -0,0 +1,168 @@ | |||
/* | |||
Copyright 2017 The Kubernetes Authors. |
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 for this file:
-
If want to put the util here, then we should name it as
test_utils.go
to keep consistent. -
But seems putting this to the folder of
testing
is better, we can just name the file astestapi.go
.
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.
try avoid one dir one file :).
Automatic merge from submit-queue (batch tested with PRs 48405, 48742, 48748, 48571, 48482) |
@k82cn do you know why the bot added the "releate-note" label while this PR doesn't have a release note? |
nop; I used |
@caesarxuchao , it seems we did not support following note in description. ```release-note-none |
What this PR does / why we need it:
When refactor scheduler to use client-go, k8s.io/api, it's also need to remove the dependeny to testapi.
prefer to only include import/BUILD changes for #44188, so created separated PR for other enhancement removal.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): partially fixes #44188Release note: