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: began retry configuration implementation #674

Conversation

shaffeeullah
Copy link
Contributor

Custom retry strategy behavior. Will merge all retry PRs into the shaffeeullah/storageRetryStrategy branch and then merge that branch into master at the end. This avoids one giant PR.

There is one test currently failing. I believe it is because the options that the makeRequest function is pulling from retry-request are not the options that we're looking for. This change is pending the retry-request library update.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 16, 2021
@bcoe
Copy link
Contributor

bcoe commented Jun 21, 2021

It's exciting to see this work coming together 😄

@stephenplusplus
Copy link
Contributor

@shaffeeullah I have opened the retry-request PR here: googleapis/retry-request#35

src/util.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ddelgrosso1 ddelgrosso1 left a comment

Choose a reason for hiding this comment

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

LGTM

@shaffeeullah shaffeeullah marked this pull request as ready for review June 30, 2021 15:00
@shaffeeullah shaffeeullah requested a review from a team as a code owner June 30, 2021 15:00
@shaffeeullah shaffeeullah requested a review from bcoe June 30, 2021 15:00
@bcoe bcoe added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2021
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

LGTM, only question is, is there any chance that existing customer applications would hit one of the code paths that throws?

For instance, did we direct customers to set config.autoRetry manually at any point, and storage will now be setting config.retryOptions.autoRetry automatically?

config.autoRetry !== undefined &&
config.retryOptions?.autoRetry !== undefined
) {
throw new ApiError(
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm understanding this logic, we through if a customer sets both autoRetry and retryOptions.autoRetry?

Is there any risk that when this is deployed existing customer applications are somehow setting both these parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All applications using nodejs-common should not be using these fields because they did not exist prior to this PR. Storage handles this case directly https://github.com/googleapis/nodejs-storage/pull/1474/files

@shaffeeullah shaffeeullah merged commit 75aa014 into shaffeeullah/storageRetryStrategy Jul 7, 2021
@shaffeeullah shaffeeullah deleted the shaffeeullah/retryConfiguration branch July 7, 2021 19:49
shaffeeullah added a commit that referenced this pull request Jul 9, 2021
* feat: began retry configuration implementation (#674)

* feat: began retry configuration implementation

* 🦉 Updates from OwlBot

* added semicolon

* 🦉 Updates from OwlBot

* removed log statement

* refactored constants

* updated retry-request and made relevant updates in this lib

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* feat: implemented retry function (#675)

* feat: implemented retry function

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* refactored retryableErrorFn into retry config

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* refactored code so test stub works as expected

* removed print

* added test

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* refactored function

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* updated retry-request to 4.2.2

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants