-
Notifications
You must be signed in to change notification settings - Fork 73
Conversation
d20189a
to
410ba7f
Compare
410ba7f
to
f9393bb
Compare
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: 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 |
@@ -22,6 +22,7 @@ import ( | |||
// +k8s:deepcopy-gen=true | |||
// JobStatus represents the current observed state of the training Job. | |||
type JobStatus struct { | |||
// +listType=set |
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.
this should be a map, with listMapKey=type
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.
I'm. afraid there can be conflicts if it's map with listMapKey=type
. For example, there can be multiple items with the same JobCondition like Running
. I think there can't be duplicated items so maybe set is suitable?
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.
Why would there be multiple conditions for the same type?
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.
Condition is a list and it's open to user to set so it may happen though it's not recommended. But you are right I checked code for JobStatus it's impossible this way. I can modify it then.
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.
The JobStatus is actually not up to the user, it's entirely controlled by the operators. And if our operators put the same condition more than once, it would be a bug. But generally, lists could act as maps if we decide to.
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.
OK, send another PR #174 to address this.
…o not be empty (#174) * Change listType to be map for jobstatus condition * rollback the changes to allow empty value for condition
As mentioned in kubeflow/mpi-operator#434 (comment)
This PR fix this issue.