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: update all automatic retry behavior to be idempotency aware #1132

Merged
merged 4 commits into from Nov 2, 2021
Merged

feat: update all automatic retry behavior to be idempotency aware #1132

merged 4 commits into from Nov 2, 2021

Conversation

BenWhitehead
Copy link
Collaborator

  1. Add new configuration option StorageOptions.Builder#setStorageRetryStrategy
  2. Add new interface StorageRetryStrategy
  3. Update all calls to be made idempotency aware
  4. Change default behavior of automatic retries to only retry those operations which are deemed to be idempotent
  5. Add @deprecated method StorageRetryStrategy.getLegacyStorageRetryStrategy providing access to a strategy which matches the previous sometimes unsafe behavior

@BenWhitehead BenWhitehead added this to the Retry Conformance Project milestone Nov 1, 2021
@BenWhitehead BenWhitehead requested a review from a team as a code owner November 1, 2021 20:37
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 1, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Nov 1, 2021
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

🚢 it!

@frankyn frankyn requested a review from tritone November 1, 2021 21:14
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Can I just say how delightful it is that the PR to actually change this behavior ended up being <10 lines?

1. Add new configuration option `StorageOptions.Builder#setStorageRetryStrategy`
2. Add new interface `StorageRetryStrategy`
3. Update all calls to be made idempotency aware
4. Change default behavior of automatic retries to only retry those operations which are deemed to be idempotent
5. Add @deprecated method `StorageRetryStrategy.getLegacyStorageRetryStrategy` providing access to a strategy which matches the previous sometimes unsafe behavior
@BenWhitehead
Copy link
Collaborator Author

Hehe, yeah the 10 lines felt great. Then the tests not setting IfGenerationMatch reared their head :(

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/java-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.

None yet

3 participants