diff --git a/go.mod b/go.mod index 97d2eb8..e4e4994 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/digitalocean/app_action go 1.20 require ( - github.com/digitalocean/godo v1.105.0 + github.com/digitalocean/godo v1.105.1 github.com/golang/mock v1.6.0 github.com/pkg/errors v0.9.1 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 01fd1e5..59c87ea 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.105.0 h1:bUfWVsyQCYZ7OQLK+p2EBFYWD5BoOgpyq/PMSQHEeMg= -github.com/digitalocean/godo v1.105.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= +github.com/digitalocean/godo v1.105.1 h1:3FjFDurw7po27Y0uHhdR+EvwNil06KCeu1Nx/0jZbmI= +github.com/digitalocean/godo v1.105.1/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/vendor/github.com/digitalocean/godo/CHANGELOG.md b/vendor/github.com/digitalocean/godo/CHANGELOG.md index 74f07c1..08458e7 100644 --- a/vendor/github.com/digitalocean/godo/CHANGELOG.md +++ b/vendor/github.com/digitalocean/godo/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v1.105.1] - 2023-11-07 + +- #652 - @andrewsomething - Retry on HTTP/2 internal errors. +- #648 - @alexandear - test: use fmt.Fprintf instead of fmt.Fprintf(fmt.Sprintf(...)) +- #651 - @alexandear - test: Replace deprecated io/ioutil with io +- #647 - @alexandear - test: add missing error check + ## [v1.105.0] - 2023-10-16 - #643 - @dweinshenker - Add support for scalable storage on database clusters diff --git a/vendor/github.com/digitalocean/godo/godo.go b/vendor/github.com/digitalocean/godo/godo.go index e3f2ec2..ee0ff2b 100644 --- a/vendor/github.com/digitalocean/godo/godo.go +++ b/vendor/github.com/digitalocean/godo/godo.go @@ -21,7 +21,7 @@ import ( ) const ( - libraryVersion = "1.105.0" + libraryVersion = "1.105.1" defaultBaseURL = "https://api.digitalocean.com/" userAgent = "godo/" + libraryVersion mediaType = "application/json" @@ -348,6 +348,16 @@ func New(httpClient *http.Client, opts ...ClientOpt) (*Client, error) { return resp, err } + retryableClient.CheckRetry = func(ctx context.Context, resp *http.Response, err error) (bool, error) { + // In addition to the default retry policy, we also retry HTTP/2 INTERNAL_ERROR errors. + // See: https://github.com/golang/go/issues/51323 + if err != nil && strings.Contains(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2") { + return true, nil + } + + return retryablehttp.DefaultRetryPolicy(ctx, resp, err) + } + var source *oauth2.Transport if _, ok := c.HTTPClient.Transport.(*oauth2.Transport); ok { source = c.HTTPClient.Transport.(*oauth2.Transport) diff --git a/vendor/modules.txt b/vendor/modules.txt index 31ab43a..119947e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/digitalocean/godo v1.105.0 +# github.com/digitalocean/godo v1.105.1 ## explicit; go 1.20 github.com/digitalocean/godo github.com/digitalocean/godo/metrics