Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

  • rename RetryAlgorithmManager -> HttpRetryAlgorithmManager
  • Add GrpcRetryAlgorithmManager
  • Update Retrying.run(GrpcStorageOptions, ...) to take a Decoder instead
    of a Function (this helps narrow things a bit to our decoders)
  • Add GrpcStorageImpl#SyntaxDecoders
    • For our "Syntax" types - Blob, Bucket, etc - Decoding an instance is
      always of the form message -> info -> syntax. This new class gives
      us a decoder that can use simply for message -> syntax by binding
      to the enclosing storage instance.
    • update "Syntax" return points to use new decoders

* rename RetryAlgorithmManager -> HttpRetryAlgorithmManager
* Add GrpcRetryAlgorithmManager
* Update Retrying.run(GrpcStorageOptions, ...) to take a Decoder instead
  of a Function (this helps narrow things a bit to our decoders)
* Add GrpcStorageImpl#SyntaxDecoders
  * For our "Syntax" types - Blob, Bucket, etc - Decoding an instance is
    always of the form message -> info -> syntax. This new class gives
    us a decoder that can use simply for message -> syntax by binding
    to the enclosing storage instance.
  * update "Syntax" return points to use new decoders
@BenWhitehead BenWhitehead requested a review from a team as a code owner June 2, 2022 23:39
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Jun 2, 2022
Copy link
Contributor

@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.

Overall lgtm, just have one nit

grpcStorageStub.deleteHmacKeyCallable().call(req);
return null;
},
Decoder.identity());
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of identity, could we use an overload which makes Decoder optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In StorageImpl we're also using identity() for the few methods where necessary. These methods are almost exclusively delete methods (which arguably should return something better than void or boolean). So I'm not sure they are enough motivation to overload Retrying.run

@BenWhitehead BenWhitehead merged commit 1f14acd into feat/grpc-storage Jun 3, 2022
@BenWhitehead BenWhitehead deleted the grpc-retry-mgr branch June 3, 2022 16:32
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. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants