Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

fix job active count; count terminating pod as failed #214

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

yowenter
Copy link
Contributor

@yowenter yowenter commented Apr 21, 2023

if pod is terminating , the pod.Status.Phase is still RUNNING.
In this case, the Job status maybe not correct.

@tenzen-y
Copy link
Member

@yowenter
Copy link
Contributor Author

@yowenter And also, can you update the unit test?

https://github.com/kubeflow/common/blob/master/pkg/controller.v1/common/status_test.go

Hi, @tenzen-y, I've added job status unittest, please review again.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

@yowenter Looks great! Thank you!

/lgtm
/assign @terrytangyuan

pkg/controller.v1/common/status_test.go Outdated Show resolved Hide resolved
setStatusForTest(&jobStatus, "worker", 2, 3, 1)
assert.Equal(t, jobStatus.ReplicaStatuses["worker"].Failed, int32(2))
setStatusForTest(&jobStatus, "worker", 2, 3, 1, 1)
// terminating pod should count as failed.
Copy link
Member

Choose a reason for hiding this comment

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

good comment :)

@tenzen-y
Copy link
Member

/lgtm cancel
for nit

Signed-off-by: yowenter <wenter.wu@gmail.com>
@terrytangyuan
Copy link
Member

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Apr 25, 2023
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: terrytangyuan

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

@google-oss-prow google-oss-prow bot merged commit fdb9739 into kubeflow:master Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants