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
feat: optimize code #890
feat: optimize code #890
Conversation
Travis tests have failedHey @zjj2wry, 2nd Buildgo build -o tf-operator.v2 github.com/kubeflow/tf-operator/cmd/tf-operator.v2
gometalinter --config=linter_config.json --vendor ./...
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,pkg/apis/common/*/zz_generated.*.go,pkg/apis/common/*/*_generated.go"
3rd Buildgo build -o tf-operator.v2 github.com/kubeflow/tf-operator/cmd/tf-operator.v2
gometalinter --config=linter_config.json --vendor ./...
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,pkg/apis/common/*/zz_generated.*.go,pkg/apis/common/*/*_generated.go"
TravisBuddy Request Identifier: 6ae20910-fd66-11e8-9fed-e5e5b8602491 |
/retest |
/test kubeflow-tf-operator-presubmit |
/retest |
/test kubeflow-tf-operator-presubmit |
/retest |
/retest |
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.
/lgtm
/approve
[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 |
@@ -279,9 +284,6 @@ func (tc *TFController) syncTFJob(key string) (bool, error) { | |||
if err != nil { | |||
return false, err | |||
} | |||
if len(namespace) == 0 || len(name) == 0 { | |||
return false, fmt.Errorf("invalid tfjob key %q: either namespace or name is missing", key) |
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.
Actually, I am not sure why we could remove the validation here.
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.
func SplitMetaNamespaceKey will check it. And we can not create/update tfjob metadata let tfjob's namespace or name be empty
/test kubeflow-tf-operator-presubmit |
@gaocegege i squash commits,waiting for CI, I feel like this will pass, haha |
/test kubeflow-tf-operator-presubmit |
@gaocegege ready go,ptal |
/lgtm |
@johnugeorge thanks, i will create a pr fix it ~ |
@zjj2wry Thanks haha 🍻 |
This change is