cloudspannerecosystem / wrench

wrench - Schema management tool for Cloud Spanner -
MIT License
239 stars 46 forks source link

Add context timeout option #62

Closed shiv3 closed 1 year ago

shiv3 commented 2 years ago

WHAT

Add option to set context timeout duration. It is almost the same as the PR here, but I thought it would be better to be able to specify by option. https://github.com/cloudspannerecosystem/wrench/pull/46

WHY

sometimes error would occur like this

Failed to execute the operation to Cloud Spanner, context deadline exceeded

As far as I can see this documents, the deadline of the context can be overwritten. https://pkg.go.dev/cloud.google.com/go/spanner/admin/database/apiv1#hdr-Use_of_Context https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

kazegusuri commented 1 year ago

sorry for not replying much time. The timeout feature is in favor of https://github.com/cloudspannerecosystem/wrench/pull/64. It supports timeout in all commands.