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

fix(update): timeout increased for watcher [EE-6580] #19

Merged
merged 4 commits into from
Jan 23, 2024
Merged
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
16 changes: 15 additions & 1 deletion kubernetes/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,21 @@ func updateDeployment(ctx context.Context, deployCli v1.DeploymentInterface, dep
Str("deploymentName", deploymentName).
Msg("Waiting for deployment to complete")

return waitForDeployment(ctx, deployCli, newDeployment.Name, newDeployment.UID)
numRetries := 1
for numRetries < 10 {
prabhat83 marked this conversation as resolved.
Show resolved Hide resolved
err := waitForDeployment(ctx, deployCli, newDeployment.Name, newDeployment.UID)
if err == nil {
return nil
}

log.Warn().Err(err).Int("number of retries", numRetries).Msg("Deployment not ready yet, retrying")
numRetries++
}
if numRetries == 10 {
return errors.New("Something went wrong, deployment not ready after 10 retries")
}

return nil
prabhat83 marked this conversation as resolved.
Show resolved Hide resolved
}

func waitForDeployment(ctx context.Context, deployCli v1.DeploymentInterface, deploymentName string, uid types.UID) error {
Expand Down
Loading