Skip to content

Commit

Permalink
chore(storage): remove use of xerrors (#10376)
Browse files Browse the repository at this point in the history
This functionality is now in the core language so xerrors can be removed as a dep.
  • Loading branch information
tritone authored Jun 12, 2024
1 parent 9eb3d1f commit d629333
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion storage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ require (
github.com/google/uuid v1.6.0
github.com/googleapis/gax-go/v2 v2.12.4
golang.org/x/oauth2 v0.21.0
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
google.golang.org/api v0.183.0
google.golang.org/genproto v0.0.0-20240528184218-531527333157
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117
Expand Down
2 changes: 0 additions & 2 deletions storage/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.183.0 h1:PNMeRDwo1pJdgNcFQ9GstuLe/noWKIc89pRWRLMvLwE=
google.golang.org/api v0.183.0/go.mod h1:q43adC5/pHoSZTx5h2mSmdF7NcyfW9JuDyIOJAgS9ZQ=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
Expand Down
7 changes: 3 additions & 4 deletions storage/invoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (

"github.com/googleapis/gax-go/v2"
"github.com/googleapis/gax-go/v2/callctx"
"golang.org/x/xerrors"
"google.golang.org/api/googleapi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down Expand Up @@ -127,7 +126,7 @@ func TestInvoke(t *testing.T) {
{
desc: "non-retriable error not retried when policy is RetryAlways",
count: 2,
initialErr: xerrors.Errorf("non-retriable error: %w", &googleapi.Error{Code: 400}),
initialErr: fmt.Errorf("non-retriable error: %w", &googleapi.Error{Code: 400}),
finalErr: nil,
isIdempotentValue: true,
retry: &retryConfig{policy: RetryAlways},
Expand Down Expand Up @@ -423,12 +422,12 @@ func TestShouldRetry(t *testing.T) {
},
{
desc: "wrapped retryable error",
inputErr: xerrors.Errorf("Test unwrapping of a temporary error: %w", &googleapi.Error{Code: 500}),
inputErr: fmt.Errorf("Test unwrapping of a temporary error: %w", &googleapi.Error{Code: 500}),
shouldRetry: true,
},
{
desc: "wrapped non-retryable error",
inputErr: xerrors.Errorf("Test unwrapping of a non-retriable error: %w", &googleapi.Error{Code: 400}),
inputErr: fmt.Errorf("Test unwrapping of a non-retriable error: %w", &googleapi.Error{Code: 400}),
shouldRetry: false,
},
{
Expand Down

0 comments on commit d629333

Please sign in to comment.