Skip to content

Commit

Permalink
Properly initialize http client to fix multiple submission issue (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Jan 7, 2020
1 parent 7fc2230 commit 7d7379b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/flink/client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (c *FlinkJobManagerClient) GetClusterOverview(ctx context.Context, url stri
// Helper method to execute the requests
func (c *FlinkJobManagerClient) executeRequest(ctx context.Context,
method string, url string, payload interface{}) (*resty.Response, error) {
client := resty.SetLogger(logger.GetLogWriter(ctx)).SetTimeout(defaultTimeOut)
client := resty.New().SetLogger(logger.GetLogWriter(ctx)).SetTimeout(defaultTimeOut)

var resp *resty.Response
var err error
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/flinkapplication/flink_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func (s *FlinkStateMachine) handleRollingBack(ctx context.Context, app *v1beta1.
// we've failed in our roll back attempt (presumably because something's now wrong with the original cluster)
// move immediately to the DeployFailed state so that the user can recover.
s.flinkController.LogEvent(ctx, app, corev1.EventTypeWarning, "RollbackFailed",
fmt.Sprintf("Failed to rollback to origin deployment, manual intervention needed: %s", reason))
fmt.Sprintf("Failed to rollback to original deployment, manual intervention needed: %s", reason))
return s.deployFailed(ctx, app)
}

Expand Down

0 comments on commit 7d7379b

Please sign in to comment.