Remove final keyword for RetryPolicy so that storage SDK can inherit from it#5530
Remove final keyword for RetryPolicy so that storage SDK can inherit from it#5530Jinming-Hu wants to merge 11 commits intomainfrom
final keyword for RetryPolicy so that storage SDK can inherit from it#5530Conversation
|
@Jinming-Hu Where is this policy added to the pipeline? Is storage planning to replace the default retry policy with this policy? |
Yes, exactly. If core SDK cannot expose an API for storage to add custom logic, we'll have to add our own retry policy. |
Where are you planning to use it and hook it up to the HTTP pipeline? I don't see this new The HttpPipeline ctor will still use the base |
|
@ahsonkhan I updated the PR with a use case in
|
|
@ahsonkhan can you take another look at this PR? |
We need to document our design for retry policy modifications. |
I was curious to see how other languages extend this capability, since this is a language agnostic feature. One approach is making the For example, .NET does this by having virtual/overridable methods including:
That said, I didn't see many compelling examples of service SDKs overriding the OnSendingRequest / OnRequestSent methods. The other approach is to add the customization logic to the Javas has a We could do something similar in C++ and add that field in the options. |
I'm fine with either way. Can we prioritize this? This is blocking STG94 feature work. |
|
@Jinming-Hu if you have it available, can you share links/info on proof of concepts/PRs by storage SDK owners for how they plan to implement this storage STG94 feature work in other languages? It would be helpful to see how the storage scenario is enabled using existing customization options for Java/.NET/Go/etc. for us to design how C++ should customize the RetryPolicy. |
.Net PR Azure/azure-sdk-for-net#42845 The key logic is in |
There's actually another approach. As this is specific to storage service, any other service doesn't have this requirement, I can just copy the whole implementation of |
|
@Jinming-Hu here's the proposed solution for this customization: #5584 We don't want the custom logic of the base Also, exposing the Please take a look at my PR, provide any feedback you may have, and adjust your PR accordingly. I encourage you to keep aspects of this storage PR which includes cleaning up the pipeline and implementing the custom |
|
Now that #5584 is checked in, this PR is probably no longer needed/needs to be updated/can be closed? |
closes #5515
Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.