-
Notifications
You must be signed in to change notification settings - Fork 225
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
Use local copy of JobStatus by mpi-operator #514
Conversation
Signed-off-by: Yuki Iwai <[email protected]>
What is missing in this PR? |
@alculquicondor There are no missing. PTAL. |
// ReplicaStatuses is map of ReplicaType and ReplicaStatus, | ||
// specifies the status of each replica. | ||
// +options | ||
ReplicaStatuses map[MPIReplicaType]*ReplicaStatus `json:"replicaStatuses,omitempty"` |
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.
another violation of API conventions T_T
But we can only change it in a new API version.
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.
Yes, that's right :(
For v2beta1, we need to keep using this API for compatibility.
pkg/apis/kubeflow/v2beta1/types.go
Outdated
type JobCondition struct { | ||
// Type of job condition. | ||
// +options | ||
Type JobConditionType `json:"type,omitempty"` |
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.
It shouldn't be optional. Also, in general we don't restrict this to enums for Job or Pod, with the assumption that external controllers can add their own.
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.
It shouldn't be optional.
Makes sense.
Also, in general we don't restrict this to enums for Job or Pod, with the assumption that external controllers can add their own.
@alculquicondor Does that mean we want to change the type of Type
to string?
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.
It can be a type, but we shouldn't add an enum annotation (which you don't currently have)
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.
Ah, I see.
SGTM.
Signed-off-by: Yuki Iwai <[email protected]>
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
Let's see which one merges first 😂 #511 /assign @terrytangyuan |
Haha. I trust @terrytangyuan :) |
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.
Thanks!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, 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 |
Signed-off-by: Yuki Iwai [email protected]
I copied the
JobStatus
api to this repository.Currently, we can not use auto-generated CRDs in our unit and E2E tests since the
common.JobStatus
requiresJobStatus.Condition
andJobStatus.ReplicaStatuses
by default in the following:https://github.com/kubeflow/common/blob/9ec55d141f90faaf52fd6df271e987e5a6781945/pkg/apis/common/v1/types.go#L25-L31
So, if we use auto-generated CRDs, we face the following errors in tests:
https://github.com/kubeflow/mpi-operator/actions/runs/4071386113/jobs/7013139204#step:8:39
Blocking: #510