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

[hot-fix-43] change the job status api #44

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion job_controller/api/v1/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type ControllerInterface interface {
DeleteJob(job interface{}) error

// UpdateJobStatus updates the job status and job conditions
UpdateJobStatus(job interface{}, replicas map[ReplicaType]*ReplicaSpec, jobStatus JobStatus) error
UpdateJobStatus(job interface{}, replicas map[ReplicaType]*ReplicaSpec, jobStatus *JobStatus) error

// UpdateJobStatusInApiServer updates the job status in API server
UpdateJobStatusInApiServer(job interface{}, jobStatus *JobStatus) error
Expand Down
2 changes: 1 addition & 1 deletion job_controller/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (jc *JobController) ReconcileJobs(
}
}

err = jc.Controller.UpdateJobStatus(job, replicas, jobStatus)
err = jc.Controller.UpdateJobStatus(job, replicas, &jobStatus)
if err != nil {
log.Warnf("UpdateJobStatus error %v", err)
return err
Expand Down
2 changes: 1 addition & 1 deletion job_controller/test_job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *TestJobController) DeleteJob(job interface{}) error {
}

func (t TestJobController) UpdateJobStatus(job interface{}, replicas map[apiv1.ReplicaType]*apiv1.ReplicaSpec,
jobStatus apiv1.JobStatus) error {
jobStatus *apiv1.JobStatus) error {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion test_job/v1/test_job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *TestJobController) DeleteJob(job interface{}) error {
}

func (t *TestJobController) UpdateJobStatus(job interface{}, replicas map[apiv1.ReplicaType]*apiv1.ReplicaSpec,
jobStatus apiv1.JobStatus) error {
jobStatus *apiv1.JobStatus) error {
return nil
}

Expand Down