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: Retry for http timeout error. Fixes #9271 #9335

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
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
fix: Retry for http timeout error. Fixes #9271
Signed-off-by: Jingkai Hung <[email protected]>
  • Loading branch information
jingkkkkai committed Aug 15, 2022
commit d4e96214e31314c5ec1aaf4afc5e10e1ccc2d002
3 changes: 2 additions & 1 deletion workflow/artifacts/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/argoproj/argo-workflows/v3/errors"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
errutil "github.com/argoproj/argo-workflows/v3/util/errors"
waitutil "github.com/argoproj/argo-workflows/v3/util/wait"
"github.com/argoproj/argo-workflows/v3/workflow/artifacts/common"
)
Expand All @@ -38,7 +39,7 @@ var (

// from https://github.com/googleapis/google-cloud-go/blob/master/storage/go110.go
func isTransientGCSErr(err error) bool {
if err == io.ErrUnexpectedEOF {
if err == io.ErrUnexpectedEOF || errutil.IsTransientErr(err) {
return true
}
switch e := err.(type) {
Expand Down
4 changes: 4 additions & 0 deletions workflow/artifacts/oss/oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

"github.com/argoproj/argo-workflows/v3/errors"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
errutil "github.com/argoproj/argo-workflows/v3/util/errors"
waitutil "github.com/argoproj/argo-workflows/v3/util/wait"
"github.com/argoproj/argo-workflows/v3/workflow/artifacts/common"
wfcommon "github.com/argoproj/argo-workflows/v3/workflow/common"
Expand Down Expand Up @@ -250,6 +251,9 @@ func isTransientOSSErr(err error) bool {
if err == nil {
return false
}
if errutil.IsTransientErr(err) {
return true
}
if ossErr, ok := err.(oss.ServiceError); ok {
for _, transientErrCode := range ossTransientErrorCodes {
if ossErr.Code == transientErrCode {
Expand Down