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

Retain for job and metricsCollector #572

Merged
merged 1 commit into from
May 23, 2019
Merged

Retain for job and metricsCollector #572

merged 1 commit into from
May 23, 2019

Conversation

hougangliu
Copy link
Member

@hougangliu hougangliu commented May 22, 2019

This change is Reviewable

@hougangliu
Copy link
Member Author

Fixes: #565

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@@ -245,6 +240,9 @@ func (r *ReconcileTrial) reconcileJob(instance *trialsv1alpha2.Trial, desiredJob
err = r.Get(context.TODO(), types.NamespacedName{Name: desiredJob.GetName(), Namespace: desiredJob.GetNamespace()}, deployedJob)
if err != nil {
if errors.IsNotFound(err) {
if instance.IsCompleted() {
Copy link
Member

Choose a reason for hiding this comment

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

Which condition is being targeted here?

Copy link
Member Author

Choose a reason for hiding this comment

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

func (trial *Trial) IsCompleted() bool {
	return trial.IsSucceeded() || trial.IsFailed() || trial.IsKilled()
}

Copy link
Member

@johnugeorge johnugeorge May 22, 2019

Choose a reason for hiding this comment

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

Can you add a comment here?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

do you mean add a comment like IsCompleted() targets "IsSucceeded() || IsFailed() || IsKilled()" everywhere IsCompleted() is called?

Copy link
Member Author

Choose a reason for hiding this comment

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

Line 147~151 deleted in this PR

Copy link
Member

Choose a reason for hiding this comment

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

Sorry. I missed that change. Can you explain the difference? And what I meant, is to add a comment why this check is added. Readers will find it easier to follow the code.

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@johnugeorge
Copy link
Member

/lgtm

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

4 similar comments
@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@hougangliu
Copy link
Member Author

/test kubeflow-katib-presubmit

@hougangliu
Copy link
Member Author

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hougangliu

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

@k8s-ci-robot k8s-ci-robot merged commit cc5f367 into kubeflow:master May 23, 2019
@hougangliu hougangliu mentioned this pull request May 24, 2019
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.

3 participants