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

Commit

Permalink
update the job status api (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlintang authored and k8s-ci-robot committed Jun 19, 2019
1 parent c8c5b56 commit 09e1ac1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit 09e1ac1

Please sign in to comment.