-
Notifications
You must be signed in to change notification settings - Fork 699
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]Remove redundant code about status and fix bug of invalid job status #715
[v1alpha2]Remove redundant code about status and fix bug of invalid job status #715
Conversation
Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io>
I will take a look. While we prefer to do one thing in one PR. Thus next time please open separate PRs for separate issues. |
/assign @gaocegege |
@@ -431,6 +193,11 @@ func isFailed(status tfv1alpha2.TFJobStatus) 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 *tfv1alpha2.TFJobStatus, condition tfv1alpha2.TFJobCondition) { | |||
//Do nothing if condition Failed | |||
if isFailed(*status) { |
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.
Besides this, I think we should set the condition Running to false when the job is succeeded or failed.
/retest |
Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io>
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 |
/retest |
…ob status (kubeflow#715) * Remove redundant code about status Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io> * fix bug of invalid job status Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io>
fix #713
fix #712
/cc @gaocegege
Signed-off-by: Pengyu Chen chenpengyu@caicloud.io
This change is