training-operator icon indicating copy to clipboard operation
training-operator copied to clipboard

Inconsistent implementation in UpdateJobStatusInApiServer method

Open HeGaoYuan opened this issue 2 years ago • 5 comments

In the following codes, they are UpdateJobStatusInApiServer method implementation in different Job. They are very similar but different. It is very confusing when programmers read the codes.

  1. Does trainingoperatorcommon.ClearGeneratedFields() method need?
  2. Does reflect.DeepEqual() method need?
  3. What is the difference between reflect.DeepEqual() and equality.Semantic.DeepEqual()?
  4. Does jc.Log.WithValues() need? It seems did nothing.

Referring to point4 of https://github.com/kubeflow/training-operator/issues/1703

https://github.com/kubeflow/training-operator/blob/e13d262fe4fabd548ded944e5356c99f30a33b00/pkg/controller.v1/mpi/mpijob_controller.go#L646-L678

https://github.com/kubeflow/training-operator/blob/e13d262fe4fabd548ded944e5356c99f30a33b00/pkg/controller.v1/mxnet/mxjob_controller.go#L430-L451

https://github.com/kubeflow/training-operator/blob/e13d262fe4fabd548ded944e5356c99f30a33b00/pkg/controller.v1/pytorch/pytorchjob_controller.go#L483-L511

HeGaoYuan avatar Dec 27 '22 02:12 HeGaoYuan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 24 '23 05:08 github-actions[bot]

cc @johnugeorge @tenzen-y @kuizhiqing

andreyvelich avatar Aug 24 '23 12:08 andreyvelich

/remove-lifecycle stale

Yes, we should refactor the UpdateJobStatusInApiServer.

tenzen-y avatar Aug 24 '23 13:08 tenzen-y

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 22 '23 15:11 github-actions[bot]

/lifecycle frozen

andreyvelich avatar Nov 22 '23 15:11 andreyvelich