Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Skip condition update when succeeded and bump tf-operator to v0.5.3 v…
Browse files Browse the repository at this point in the history
…ersion (#44)

* bump tf-operator to v0.5.3 version

* Skip condition update when succeeded
  • Loading branch information
wackxu authored and k8s-ci-robot committed Jun 10, 2019
1 parent a545803 commit 6844634
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ required = [

[[override]]
name = "github.com/kubeflow/tf-operator"
branch = "master"
version = "v0.5.3"

[prune]
go-tests = true
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1/mxnet/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ func isFailed(status mxv1.MXJobStatus) bool {
// If the condition that we are about to add already exists
// and has the same status and reason then we are not going to update.
func setCondition(status *mxv1.MXJobStatus, condition mxv1.MXJobCondition) {
// Do nothing if MXJobStatus have failed condition
if isFailed(*status) {
// Do nothing if MXJobStatus is completed
if isFailed(*status) || isSucceeded(*status) {
return
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1beta1/mxnet/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ func isFailed(status mxv1beta1.MXJobStatus) bool {
// If the condition that we are about to add already exists
// and has the same status and reason then we are not going to update.
func setCondition(status *mxv1beta1.MXJobStatus, condition mxv1beta1.MXJobCondition) {
// Do nothing if MXJobStatus have failed condition
if isFailed(*status) {
// Do nothing if MXJobStatus is completed
if isFailed(*status) || isSucceeded(*status) {
return
}

Expand Down

0 comments on commit 6844634

Please sign in to comment.