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

feat(storage): returned wrapped error for timeouts #4802

Merged
merged 7 commits into from Oct 5, 2021

Conversation

tritone
Copy link
Contributor

@tritone tritone commented Sep 23, 2021

This piggybacks on #4797 to allow storage to expose wrapped
service errors when a call retries without success until timeout
or cancellation.

I also updated all checks for context sentinel errors in storage
to use xerrors.Is instead of strict equality. Users of this
package should do the same. I'll update the documentation on
errors from this package in a subsequent PR.

We will have to bump the dependency on the root module before
merging this change I believe.

Fixes #4197

This piggybacks on googleapis#4797 to allow storage to expose wrapped
service errors when a call retries without success until timeout
or cancellation.

I also updated all checks for context sentinel errors in storage
to use xerrors.Is instead of strict equality. Users of this
package should do the same. I'll update the documentation on
errors from this package in a subsequent PR.

We will have to bump the dependency on the root module before
merging this change I believe.

Fixes googleapis#4197
@tritone tritone requested review from a team as code owners September 23, 2021 22:43
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Sep 23, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 23, 2021
Copy link
Contributor

@BrennaEpp BrennaEpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very excited about this work!

storage/integration_test.go Outdated Show resolved Hide resolved
tritone added a commit to tritone/google-cloud-go that referenced this pull request Sep 24, 2021
Fix up type assertions with googleapi.Error to use xerrors.As.
In bigquery, this was only required in integration tests and in
the package docs.

Follows from googleapis#4797 and similar to some of the fixes in storage
in googleapis#4802 (storage required additional changes though).
@google-cla
Copy link

google-cla bot commented Sep 24, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 24, 2021
@google-cla google-cla bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 24, 2021
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 5, 2021
Fix up type assertions with googleapi.Error to use xerrors.As.
In bigquery, this was only required in integration tests and in
the package docs.

Follows from #4797 and similar to some of the fixes in storage
in #4802 (storage required additional changes though).
@tritone tritone added the automerge Merge the pull request once unit tests and other checks pass. label Oct 5, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 0e102a3 into googleapis:master Oct 5, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: Uninformative error messages after errors cause timeout
3 participants