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(executor): Replace default retry in executor with an increased value retryer #3891

Merged
merged 4 commits into from
Aug 31, 2020
Merged
Changes from all commits
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
9 changes: 5 additions & 4 deletions workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import (
os_specific "github.com/argoproj/argo/workflow/executor/os-specific"
)

var MainContainerStartRetry = wait.Backoff{
anggao marked this conversation as resolved.
Show resolved Hide resolved
// ExecutorRetry is a retry backoff settings for WorkflowExecutor
var ExecutorRetry = wait.Backoff{
Steps: 8,
anggao marked this conversation as resolved.
Show resolved Hide resolved
Duration: 1 * time.Second,
Factor: 1.0,
Expand Down Expand Up @@ -619,7 +620,7 @@ func (we *WorkflowExecutor) getPod() (*apiv1.Pod, error) {
podsIf := we.ClientSet.CoreV1().Pods(we.Namespace)
var pod *apiv1.Pod
var err error
_ = wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) {
_ = wait.ExponentialBackoff(ExecutorRetry, func() (bool, error) {
pod, err = podsIf.Get(we.PodName, metav1.GetOptions{})
if err != nil {
log.Warnf("Failed to get pod '%s': %v", we.PodName, err)
Expand Down Expand Up @@ -920,7 +921,7 @@ func (we *WorkflowExecutor) Wait() error {
annotationUpdatesCh := we.monitorAnnotations(ctx)
go we.monitorDeadline(ctx, annotationUpdatesCh)

_ = wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) {
_ = wait.ExponentialBackoff(ExecutorRetry, func() (bool, error) {
err = we.RuntimeExecutor.Wait(mainContainerID)
if err != nil {
log.Warnf("Failed to wait for container id '%s': %v", mainContainerID, err)
Expand All @@ -947,7 +948,7 @@ func (we *WorkflowExecutor) waitMainContainerStart() (string, error) {
var err error
var watchIf watch.Interface

err = wait.ExponentialBackoff(MainContainerStartRetry, func() (bool, error) {
err = wait.ExponentialBackoff(ExecutorRetry, func() (bool, error) {
watchIf, err = podsIf.Watch(opts)
if err != nil {
log.Debugf("Failed to establish watch, retrying: %v", err)
Expand Down