Skip to content

Conversation

danielbankhead
Copy link
Contributor

@danielbankhead danielbankhead commented Oct 26, 2021

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1635

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Oct 26, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 26, 2021
@ddelgrosso1
Copy link
Contributor

This looks good to me, no concerns on my end.

@danielbankhead danielbankhead changed the title Add retry logic to file#download via file#createReadStream feat: Add retry logic to file#download via file#createReadStream Oct 28, 2021
@danielbankhead danielbankhead marked this pull request as ready for review October 28, 2021 02:15
@danielbankhead danielbankhead requested review from a team as code owners October 28, 2021 02:15
@shaffeeullah
Copy link
Contributor

This is mapped to storage.objects.get in conformance testing and is currently passing retry tests (which tells me that it's being retried). Can you fill me in on the background on why this extra logic is necessary? Is there a bug in the conformance testing? @ddelgrosso1 do you happen to know more about the background of this issue?

@ddelgrosso1
Copy link
Contributor

In looking at this code it looked like a refactor to me, not adding new functionality. Did I miss something?

@danielbankhead
Copy link
Contributor Author

I can add some clarity - this PR is for supporting retries for file#download, which utilizes file#createReadStream. Reviewing file#createReadStream's usage; it appears to be exclusively used for GET requests - which can always be retried if the configuration allows (storage.retryOptions.autoRetry).

@shaffeeullah
Copy link
Contributor

I can add some clarity - this PR is for supporting retries for file#download, which utilizes file#createReadStream. Reviewing file#createReadStream's usage; it appears to be exclusively used for GET requests - which can always be retried if the configuration allows (storage.retryOptions.autoRetry).

From your understanding, was file.download retried before this PR? From my understanding it is.

@danielbankhead danielbankhead deleted the add-retry-logic-to-file.download branch October 28, 2021 18:03
@danielbankhead
Copy link
Contributor Author

Closed - the file#download currently supports retries and has been used validated via conformance testing:

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 googleapis/nodejs-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.

Add retry logic to file.download because it fails with 504 often

4 participants