Closed Jeffwan closed 4 years ago
pkg/controller.v1/expectation/expectation_test.go:87:19: Error return value of `e.SetExpectations` is not checked (errcheck)
638 e.SetExpectations(rcKey, adds, dels)
639 ^
640pkg/controller.v1/expectation/expectation_test.go:123:19: Error return value of `e.SetExpectations` is not checked (errcheck)
641 e.SetExpectations(rcKey, 1, 2)
642 ^
643The command "golangci-lint run ./..." exited with 1.
This is too restrict.. it's pretty common to ignore output check. Disable errcheck
for this.
/hold
Please help on review first. I will run some real test against this version manually.
@gaocegege This one bring expectation back to repo. We remove all the direct dependency of Kubernetes now.
Is this still on hold?
/hold cancel
This can be merged. @terrytangyuan
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: terrytangyuan
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Resolve #48. Besides #73, this is the last PR to remove direct Kubernetes dependency. I think current strategy is folk PodControlInterface and Expectations from main Kubernetes pkg and maintain in common repo. This also helps to make sure our code is reliable without worrying about changes K8s version upgrade brings.
For long term, I will try to brings these changes to
kubernetes/client-go
and we can use client-go directly. Track progress here. https://github.com/kubernetes/client-go/issues/332The purpose of this PR is to get ride of direct Kubernetes dependency. Expectation is being used in JobController to tell the number of pods/services they expect.
In the future, Instead of
import k8s.io/kubernetes/pkg/controller
, User need toimport github.com/kubeflow/common/pkg/controller.v1/expectation
and useexpectation.NewControllerExpectations
instead.Signed-off-by: Jiaxin Shan seedjeffwan@gmail.com
/cc @gaocegege @terrytangyuan