Skip to content
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

Update with external checkpoints #199

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
handle job cancelleation on checkpointupgrade
David Birdsong committed May 13, 2020
commit 0969f4941d3c8abb688cb2888aad0e81304c8e8a
10 changes: 8 additions & 2 deletions pkg/controller/flinkapplication/flink_state_machine.go
Original file line number Diff line number Diff line change
@@ -321,11 +321,17 @@ func (s *FlinkStateMachine) handleApplicationSavepointingWithCheckpoint(ctx cont
return statusUnchanged, err
}

application.Status.SavepointPath = checkpointPath
jobID := s.flinkController.GetLatestJobID(ctx, application)
if err := s.flinkController.ForceCancel(ctx, application, application.Status.DeployHash, jobID); err != nil {
return statusUnchanged, err
}

s.flinkController.LogEvent(ctx, application, corev1.EventTypeNormal, "CancellingJob",
fmt.Sprintf("Cancelling job job %s with a final checkpoint", jobID))
application.Status.JobStatus.JobID = ""
application.Status.SavepointPath = checkpointPath
s.updateApplicationPhase(application, v1beta1.FlinkApplicationSubmittingJob)
return statusChanged, nil

}

func (s *FlinkStateMachine) initializeAppStatusIfEmpty(application *v1beta1.FlinkApplication) {