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

Update provisioning tests to retry on throttling #2411

Merged
merged 4 commits into from
May 25, 2022
Merged

Conversation

abhipsaMisra
Copy link
Member

One of the biggest pain points while working on the feature for DPS client certs was our E2E test limitation of reusing the same enrollment entry for X509 certificate-based enrollments. Once I modified the tests to generate X509 certificate-based enrollments on-demand, our DPS infrastructure was unable to handle the volume of requests it was receiving from our E2E tests to create enrollments. As a result, most of our tests kept on getting throttled and would subsequently fail.

This PR adds retry logic for provisioning service client failures with error codes 429 (throttling) and 5xx (server errors).

@abhipsaMisra
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@timtay-microsoft
Copy link
Member

Do we need this for creating enrollment groups as well? Or do we not create enough of them to warrant adding retry to them?

@abhipsaMisra
Copy link
Member Author

Do we need this for creating enrollment groups as well? Or do we not create enough of them to warrant adding retry to them?

Right now, we don't create as many enrollment groups as we create individual enrollments. That said, I'm working on creating X509 based enrollment groups on-demand as well. With that change I'll be adding the retry policies to enrollment groups as well.

This reverts commit 4b36d42.
@abhipsaMisra
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@abhipsaMisra abhipsaMisra merged commit 524c04b into main May 25, 2022
@abhipsaMisra abhipsaMisra deleted the abmisr/provRetry branch May 25, 2022 00:07
drwill-ms pushed a commit that referenced this pull request Jun 2, 2022
* refactor(e2e-tests): Update provisioning tests to retry on throttling (#2411)

* refactor(e2e-tests): Update reprovisioning tests to retry on throttling

* refactor(iot-device): Add additional logging statement to disposal flow (#2414)

* fix(iot-device): Fix twin operations with Mqtt to retry on throttling (#2416)

* Add documentation about HttpClient and socket exhaustion to service clients (#2423)

Co-authored-by: Abhipsa Misra <[email protected]>
Co-authored-by: brycewang-microsoft <[email protected]>
timstewartm pushed a commit to timstewartm/azure-iot-sdk-csharp that referenced this pull request May 30, 2024
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

Successfully merging this pull request may close these issues.

2 participants