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

controller: Update status in time #476

Merged
merged 4 commits into from
Mar 20, 2018
Merged

controller: Update status in time #476

merged 4 commits into from
Mar 20, 2018

Conversation

gaocegege
Copy link
Member

@gaocegege gaocegege commented Mar 19, 2018

/assign @ScorpioCPH

Now we do not update the status because we return error before the update function call. Then I changed the behaviour.


This change is Reviewable

@coveralls
Copy link

coveralls commented Mar 19, 2018

Coverage Status

Coverage increased (+1.9%) to 57.372% when pulling 7255358 on gaocegege:test into 71a5a26 on kubeflow:v1alpha2.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
tfjob.Status.TFReplicaStatuses[rtype].Succeeded = succeeded
tfjob.Status.TFReplicaStatuses[rtype].Failed = failed

log.Info(tfjob.Status.TFReplicaStatuses[rtype])
Copy link
Member

Choose a reason for hiding this comment

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

Remove this log?

@@ -129,12 +129,13 @@ func (tc *TFJobController) reconcilePods(
tfjob.Status.TFReplicaStatuses[rtype] = &tfv1alpha2.TFReplicaStatus{}
}

tfjob.Status.TFReplicaStatuses[rtype].Active = int32(len(activePods))
tfjob.Status.TFReplicaStatuses[rtype].Active -= int32(diff)
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some comments about this logic?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, will do it.

Signed-off-by: Ce Gao <gaoce@caicloud.io>
@gaocegege
Copy link
Member Author

PTAL @ScorpioCPH

@ScorpioCPH
Copy link
Member

/lgtm

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ScorpioCPH

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

@gaocegege gaocegege merged commit dd6f106 into kubeflow:v1alpha2 Mar 20, 2018
@gaocegege gaocegege deleted the test branch March 20, 2018 04:03
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.

5 participants