Skip to content
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

[v1alpha2] Add PDB of TFReplicaSet for gang scheduling by kube-arbitrator #717

Merged
merged 1 commit into from
Jul 9, 2018
Merged

[v1alpha2] Add PDB of TFReplicaSet for gang scheduling by kube-arbitrator #717

merged 1 commit into from
Jul 9, 2018

Conversation

codeflitting
Copy link
Member

@codeflitting codeflitting commented Jul 6, 2018

fix #575

Signed-off-by: Pengyu Chen [email protected]


This change is Reviewable

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: jlewi

Assign the PR to them by writing /assign @jlewi in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@TravisBuddy
Copy link

Travis tests have failed

Hey @codeflitting,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

2nd Build

gometalinter --config=linter_config.json --vendor ./...
pkg/controller.v2/controller_test.go:55:115:warning: unused variable or constant too few arguments in call to NewTFJobController (varcheck)
pkg/controller.v2/controller_test.go:55:115:warning: too few arguments in call to NewTFJobController (gosimple, staticcheck)
goveralls -service=travis-ci -v -package ./pkg/... -ignore "pkg/client/*/*.go,pkg/client/*/*/*.go,pkg/client/*/*/*/*.go,pkg/client/*/*/*/*/*.go,pkg/client/*/*/*/*/*/*.go,pkg/client/*/*/*/*/*/*/*.go,pkg/util/testutil/*.go,pkg/apis/tensorflow/*/zz_generated.*.go,pkg/apis/tensorflow/*/*_generated.go"
=== RUN   TestAddAccelertor
--- PASS: TestAddAccelertor (0.00s)
PASS
coverage: 2.0% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper	0.070s
=== RUN   TestSetDefaults_TFJob
--- PASS: TestSetDefaults_TFJob (0.00s)
PASS
coverage: 1.7% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1	0.069s
=== RUN   TestSetTypeNames
--- PASS: TestSetTypeNames (0.00s)
=== RUN   TestSetDefaultTFJob
--- PASS: TestSetDefaultTFJob (0.00s)
PASS
coverage: 2.8% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2	0.067s
=== RUN   TestValidateAlphaTwoTFJobSpec
--- PASS: TestValidateAlphaTwoTFJobSpec (0.00s)
=== RUN   TestValidate
--- PASS: TestValidate (0.00s)
PASS
coverage: 3.4% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation	0.080s
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2	[no test files]
=== RUN   TestCreatePods
--- PASS: TestCreatePods (0.02s)
=== RUN   TestCreateService
--- PASS: TestCreateService (0.00s)
=== RUN   TestCreateServicesWithControllerRef
--- PASS: TestCreateServicesWithControllerRef (0.00s)
=== RUN   TestClaimServices
--- PASS: TestClaimServices (0.00s)
PASS
coverage: 5.5% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/control	0.094s
?   	github.com/kubeflow/tf-operator/pkg/controller	[no test files]
FAIL	github.com/kubeflow/tf-operator/pkg/controller.v2 [build failed]
exit status 2: warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/controller
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/trainer
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/util/k8sutil
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/util/signals
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/util/testutil
warning: no packages being tested depend on github.com/kubeflow/tf-operator/pkg/version
# github.com/kubeflow/tf-operator/pkg/controller.v2
pkg/controller.v2/controller_test.go:55:27: not enough arguments in call to NewTFJobController
	have ("github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2".TFJobInformer, kubernetes.Interface, versioned.Interface, informers.SharedInformerFactory, externalversions.SharedInformerFactory)
	want ("github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2".TFJobInformer, kubernetes.Interface, versioned.Interface, informers.SharedInformerFactory, externalversions.SharedInformerFactory, options.ServerOption)

3rd Build

gometalinter --config=linter_config.json --vendor ./...
pkg/controller.v2/controller_test.go:55:115:warning: unused variable or constant too few arguments in call to NewTFJobController (varcheck)
pkg/controller.v2/controller_test.go:55:115:warning: too few arguments in call to NewTFJobController (gosimple, staticcheck)
pkg/controller.v2/controller_test.go:55:27:error: not enough arguments in call to NewTFJobController (vet)

travis_time:end:0b40fab8:start=1530861122983304255,finish=1530861244882174787,duration=121898870532
goveralls -service=travis-ci -v -package ./pkg/... -ignore "pkg/client/*/*.go,pkg/client/*/*/*.go,pkg/client/*/*/*/*.go,pkg/client/*/*/*/*/*.go,pkg/client/*/*/*/*/*/*.go,pkg/client/*/*/*/*/*/*/*.go,pkg/util/testutil/*.go,pkg/apis/tensorflow/*/zz_generated.*.go,pkg/apis/tensorflow/*/*_generated.go"
=== RUN   TestAddAccelertor
--- PASS: TestAddAccelertor (0.00s)
PASS
coverage: 8.4% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper	0.032s	coverage: 8.4% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
=== RUN   TestSetDefaults_TFJob
--- PASS: TestSetDefaults_TFJob (0.00s)
PASS
coverage: 6.5% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1	0.033s	coverage: 6.5% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
=== RUN   TestSetTypeNames
--- PASS: TestSetTypeNames (0.00s)
=== RUN   TestSetDefaultTFJob
--- PASS: TestSetDefaultTFJob (0.00s)
PASS
coverage: 22.0% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2	0.031s	coverage: 22.0% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
=== RUN   TestValidateAlphaTwoTFJobSpec
time="2018-07-06T07:14:15Z" level=warning msg="Image is undefined in the container"
time="2018-07-06T07:14:15Z" level=warning msg="There is no container named tensorflow in Worker"
--- PASS: TestValidateAlphaTwoTFJobSpec (0.00s)
=== RUN   TestValidate
--- PASS: TestValidate (0.00s)
PASS
coverage: 12.2% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation	0.039s	coverage: 12.2% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1	[no test files]
?   	github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2	[no test files]
=== RUN   TestCreatePods
--- PASS: TestCreatePods (0.01s)
=== RUN   TestCreateService
time="2018-07-06T07:14:25Z" level=info msg="Controller test-tfjob created service empty_service"
--- PASS: TestCreateService (0.00s)
=== RUN   TestCreateServicesWithControllerRef
time="2018-07-06T07:14:25Z" level=info msg="Controller test-tfjob created service empty_service"
--- PASS: TestCreateServicesWithControllerRef (0.00s)
=== RUN   TestClaimServices
--- PASS: TestClaimServices (0.00s)
PASS
coverage: 44.9% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
ok  	github.com/kubeflow/tf-operator/pkg/control	0.055s	coverage: 44.9% of statements in github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/apis/tensorflow/validation, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/scheme, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/internalinterfaces, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha1, github.com/kubeflow/tf-operator/pkg/client/listers/kubeflow/v1alpha2, github.com/kubeflow/tf-operator/pkg/control, github.com/kubeflow/tf-operator/pkg/controller, github.com/kubeflow/tf-operator/pkg/controller.v2, github.com/kubeflow/tf-operator/pkg/generator, github.com/kubeflow/tf-operator/pkg/trainer, github.com/kubeflow/tf-operator/pkg/util, github.com/kubeflow/tf-operator/pkg/util/k8sutil, github.com/kubeflow/tf-operator/pkg/util/signals, github.com/kubeflow/tf-operator/pkg/util/testutil, github.com/kubeflow/tf-operator/pkg/util/train, github.com/kubeflow/tf-operator/pkg/util/unstructured, github.com/kubeflow/tf-operator/pkg/version
?   	github.com/kubeflow/tf-operator/pkg/controller	[no test files]
FAIL	github.com/kubeflow/tf-operator/pkg/controller.v2 [build failed]
exit status 2: warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/apis/tensorflow/helper
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/fake
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha1/fake
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/client/clientset/versioned/typed/kubeflow/v1alpha2/fake
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/controller
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/trainer
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/util/k8sutil
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/util/signals
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/util/testutil
warning: no packages being tested depend on matches for pattern github.com/kubeflow/tf-operator/pkg/version
# github.com/kubeflow/tf-operator/pkg/controller.v2
pkg/controller.v2/controller_test.go:55:27: not enough arguments in call to NewTFJobController
	have ("github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2".TFJobInformer, kubernetes.Interface, versioned.Interface, informers.SharedInformerFactory, externalversions.SharedInformerFactory)
	want ("github.com/kubeflow/tf-operator/pkg/client/informers/externalversions/kubeflow/v1alpha2".TFJobInformer, kubernetes.Interface, versioned.Interface, informers.SharedInformerFactory, externalversions.SharedInformerFactory, options.ServerOption)


travis_time:end:07b1780c:start=1530861244888039077,finish=1530861269531721474,duration=24643682397

expectations: controller.NewControllerExpectations(),
workQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), tfv1alpha2.Plural),
recorder: recorder,
enableGangScheduling: option.EnableGangScheduling,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should define the field in TFJobControllerConfiguration and set it in config here https://github.com/kubeflow/tf-operator/pull/717/files#diff-adc8ad6b53f8e2be56aa2ba02afbcc2bR85

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you means set it like this

// Create new TFJobController.
tc := &TFJobController{
	config: TFJobControllerConfiguration{
		ReconcilerSyncLoopPeriod: metav1.Duration{Duration: 15 * time.Second},
		enableGangScheduling:     option.EnableGangScheduling,
	},
     }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it is better, WDYT

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels Jul 8, 2018
@coveralls
Copy link

coveralls commented Jul 8, 2018

Coverage Status

Coverage increased (+0.4%) to 57.824% when pulling d54e21d on codeflitting:add_pdb_of_tf_replicaset into c3214b2 on kubeflow:master.

@codeflitting codeflitting changed the title WIP: [v1alpha2] Add PDB of TFReplicaSet for gang scheduling by kube-arbitr… [v1alpha2] Add PDB of TFReplicaSet for gang scheduling by kube-arbitrator Jul 9, 2018
Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM while waiting for @jinzhejz 's comment

}

// Check the pdb exist or not
pdbName := "tf-job-pdb-" + tfjob.Name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could just use the job name as pdb name.


// Create pdb for gang scheduling by kube-arbitrator
minAvailable := intstr.FromInt(int(tfjobReplicas))
createPdb := &v1beta1.PodDisruptionBudget{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinzhejz

Does the code work for you?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we set OwnerReference with controller? In kube-arbitrator, we prefer to use OwnerReference to avoid Selector because of performance concern.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, when is PDB deleted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we are going to add owner reference now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to set the owner reference for the pdb?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to rely on Kubernetes garbage collector for the pdb currently. While we should implement the logic about deleting pdb when deleting the tfjob.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to set the owner reference for the pdb?

Yes, set OwernReference for the PDB, and also set OwerReference.Controller to true

We want to rely on Kubernetes garbage collector for the pdb currently.

That's OK to me :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codeflitting

We come to an agreement, please update the code, thanks for your contribution!

@codeflitting
Copy link
Member Author

@gaocegege I have changed the name of PDB with tfjob’ name

@k82cn OwnerReference added. Now the PDB is automatically deleted when the tfjob is deleted
Please take a look again

@gaocegege
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaocegege

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 7ebe995 into kubeflow:master Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v1alpha2] Add PDB of TFReplicaSet for gang scheduling by kube-arbitrator
6 participants