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]Remove redundant code about status and fix bug of invalid job status #715

Merged
merged 2 commits into from
Jul 5, 2018
Merged

[v1alpha2]Remove redundant code about status and fix bug of invalid job status #715

merged 2 commits into from
Jul 5, 2018

Conversation

codeflitting
Copy link
Member

@codeflitting codeflitting commented Jul 4, 2018

fix #713
fix #712

/cc @gaocegege

Signed-off-by: Pengyu Chen chenpengyu@caicloud.io


This change is Reviewable

Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io>
@gaocegege
Copy link
Member

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.

@coveralls
Copy link

coveralls commented Jul 4, 2018

Coverage Status

Coverage decreased (-0.9%) to 57.473% when pulling 3afce2b on codeflitting:clean_code_of_tfjob_status into c612b36 on kubeflow:master.

@codeflitting codeflitting changed the title WIP [v1alpha2]Remove redundant code about status and fix bug of invalid job status [v1alpha2]Remove redundant code about status and fix bug of invalid job status Jul 4, 2018
@codeflitting
Copy link
Member Author

/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) {
Copy link
Member

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.

@gaocegege
Copy link
Member

/retest

Signed-off-by: Pengyu Chen <chenpengyu@caicloud.io>
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
/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

@codeflitting
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit c3214b2 into kubeflow:master Jul 5, 2018
@codeflitting codeflitting deleted the clean_code_of_tfjob_status branch July 5, 2018 06:02
jetmuffin pushed a commit to jetmuffin/tf-operator that referenced this pull request Jul 9, 2018
…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>
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] Remove redundant code about status [v1alpha2] Invalid Job Status
4 participants