Skip to content

Commit

Permalink
Fix job submitter status nil pointer access (#446)
Browse files Browse the repository at this point in the history
Co-authored-by: Barna Kutassy <[email protected]>
  • Loading branch information
Barnabas Kutassy and Barna Kutassy authored Aug 4, 2022
1 parent 9ffed40 commit 53df4ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/flinkcluster/flinkcluster_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ func (s *FlinkJobSubmitter) getState() JobSubmitState {
return JobDeployStateSucceeded
// Job ID not found cases:
// Failed and job ID not found.
case s.job.Status.Failed > 0:
case s.job != nil && s.job.Status.Failed > 0:
return JobDeployStateFailed
// Ongoing job submission.
case s.job.Status.Succeeded == 0 && s.job.Status.Failed == 0:
case s.job != nil && s.job.Status.Succeeded == 0 && s.job.Status.Failed == 0:
fallthrough
// Finished, but failed to extract log.
case s.log == nil:
Expand Down

0 comments on commit 53df4ad

Please sign in to comment.