feat: add functionality for passing preconditions at the function level#1993
feat: add functionality for passing preconditions at the function level#1993shaffeeullah merged 70 commits intomainfrom
Conversation
…feeullah/preconditionUpdates
…feeullah/preconditionUpdates
…feeullah/preconditionUpdates
…feeullah/preconditionUpdates
…feeullah/preconditionUpdates
danielbankhead
left a comment
There was a problem hiding this comment.
Looks good, just 2 things
| } | ||
|
|
||
| if (typeof err.code === 'string') { | ||
| const reason = (err.code as string).toLowerCase(); |
There was a problem hiding this comment.
The cast here shouldn’t be necessary.
There was a problem hiding this comment.
without this line it throws errors: Property 'toLowerCase' does not exist on type 'never'.
frankyn
left a comment
There was a problem hiding this comment.
Two comments, IIUC you're extending existing options with PreconditionOptions for all operations.
…#2020) * tests: remove callback waterfall from make bucket private system test * cleaner implementation
…pis/nodejs-storage into shaffeeullah/preconditionUpdates
…pis/nodejs-storage into shaffeeullah/preconditionUpdates
|
@frankyn can you please take another look at this when you have a sec? |
frankyn
left a comment
There was a problem hiding this comment.
I had one more question, otherwise LGTM.
|
|
||
| if (typeof reqOpts.maxRetries === 'number') { | ||
| options.retries = reqOpts.maxRetries; | ||
| options.noResponseRetries = reqOpts.maxRetries; |
There was a problem hiding this comment.
naive question, shouldn't this value come from maxRetryValue instead?
There was a problem hiding this comment.
reqOpts.maxRetries overrides maxRetryValue. It's used in cases where we need to override the user (like forcing no retries because of idempotency)
Adds functionality to pass preconditions at the function level. Also includes a few fixes such as:
Internal ticket: b/239141167