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

Polly integration #86

Open
rasmuschristensen opened this issue Aug 16, 2019 · 2 comments
Open

Polly integration #86

rasmuschristensen opened this issue Aug 16, 2019 · 2 comments

Comments

@rasmuschristensen
Copy link

Working with bulk inserts I pretty often run into the request limit of dynamics. I've tried to wrap the calls using Polly and a policy that handles CRMWebAPIException. For some reason this has no effect and I dont see the WaitAndRetry in effect.
I'm using Azure Functions running .net Core, and looking into this lib I see a lot of classic HttpClient code. Not sure if this mix might cause some issues.

@mohsinonxrm
Copy link

@rasmuschristensen , can you share your code here? I'm actually planning to opening a pull request to this repo with the latest .net core implementation using the httpclient factory and providing the retry policy there.

Also, you have to think about idempotency for requests that are not GET, so any POST/PATCH will need additional handling/custom handling on the implementing application side.

I'm not sure if you're aware of the new API limits (no I'm not talking about the ones from March 2019 https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/api-limits)

I'm talking about new API Limits from August 2019: https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations

so yes, everyone should be using $batch request (with max of 100 requests) now or ExecuteMultipleRequest (with max 1000 requests), however, if things go wrong with failed requests in those batches, then for idempotency you'll need to do Get OR RetrieveRequest.

Anyway, things are going to get much complicated/complex going forward, that's for sure.

@mohsinonxrm
Copy link

@rasmuschristensen , I'll be opening a pull request in a couple of days (already coded, going to test a bit more) and submitting the changes for @davidyack to review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants