Skip to content

Retry on all 429 and 503, even when missing Retry-After header#402

Merged
mgyucht merged 4 commits intomainfrom
retry-on-all-429
Oct 13, 2023
Merged

Retry on all 429 and 503, even when missing Retry-After header#402
mgyucht merged 4 commits intomainfrom
retry-on-all-429

Conversation

@mgyucht
Copy link
Copy Markdown
Contributor

@mgyucht mgyucht commented Oct 12, 2023

Changes

Change HTTP client to always retry on 429 and 503, regardless of whether Retry-After header is present. If absent, default to 1 second, as we do today.

Subsumes #391 and #396 while we're still discussing error architecture in the SDK.

Tests

Unit test to ensure that 429 and 503 work with and without Retry-After header.

@mgyucht mgyucht requested a review from pietern October 12, 2023 13:35
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
databricks/sdk/core.py 80.49% <100.00%> (+0.12%) ⬆️

📢 Thoughts on this report? Let us know!.

@mgyucht mgyucht added this pull request to the merge queue Oct 13, 2023
Merged via the queue into main with commit 8ee6ff3 Oct 13, 2023
@mgyucht mgyucht deleted the retry-on-all-429 branch October 13, 2023 08:34
mgyucht added a commit that referenced this pull request Oct 24, 2023
* Retry on all 429 and 503, even when missing Retry-After header ([#402](#402)).
* Add support for tokenless authentication for GitHub Actions configured with OpenID Connect with Azure User Managed Identity (or Service Principal) ([#385](#385)).
* Reduce redundant warning messages in azure-cli credential provider ([#410](#410)).

API Changes:

 * Added `attributes`, `count`, `excluded_attributes`, `filter`, `sort_by`, `sort_order`, and `start_index` fields for `databricks.sdk.service.iam.GetAccountUserRequest` and `databricks.sdk.service.iam.GetUserRequest`.
 * Added `schemas` field for `databricks.sdk.service.iam.Group`, `databricks.sdk.service.iam.ListGroupsResponse`, `databricks.sdk.service.iam.ListServicePrincipalResponse`, `databricks.sdk.service.iam.ListUsersResponse`, `databricks.sdk.service.iam.ServicePrincipal`, and `databricks.sdk.service.iam.User`.
 * Added `databricks.sdk.service.iam.GetSortOrder`, `databricks.sdk.service.iam.GroupSchema`, `databricks.sdk.service.iam.ListResponseSchema`, `databricks.sdk.service.iam.ServicePrincipalSchema`, and `databricks.sdk.service.iam.UserSchema` dataclasses.
 * Added `webhook_notifications` field for `databricks.sdk.service.jobs.SubmitTask`.
 * Added [w.apps](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/apps.html) workspace-level service and related dataclasses
 * Added [a.account_network_policy](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_network_policy.html) account-level service and related dataclasses.

OpenAPI SHA: 5903bb39137fd76ac384b2044e425f9c56840e00, Date: 2023-10-23
@mgyucht mgyucht mentioned this pull request Oct 24, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 24, 2023
* Retry on all 429 and 503, even when missing Retry-After header
([#402](#402)).
* Add support for tokenless authentication for GitHub Actions configured
with OpenID Connect with Azure User Managed Identity (or Service
Principal)
([#385](#385)).
* Reduce redundant warning messages in azure-cli credential provider
([#410](#410)).

API Changes:

* Added `attributes`, `count`, `excluded_attributes`, `filter`,
`sort_by`, `sort_order`, and `start_index` fields for
`databricks.sdk.service.iam.GetAccountUserRequest` and
`databricks.sdk.service.iam.GetUserRequest`.
* Added `schemas` field for `databricks.sdk.service.iam.Group`,
`databricks.sdk.service.iam.ListGroupsResponse`,
`databricks.sdk.service.iam.ListServicePrincipalResponse`,
`databricks.sdk.service.iam.ListUsersResponse`,
`databricks.sdk.service.iam.ServicePrincipal`, and
`databricks.sdk.service.iam.User`.
* Added `databricks.sdk.service.iam.GetSortOrder`,
`databricks.sdk.service.iam.GroupSchema`,
`databricks.sdk.service.iam.ListResponseSchema`,
`databricks.sdk.service.iam.ServicePrincipalSchema`, and
`databricks.sdk.service.iam.UserSchema` dataclasses.
* Added `webhook_notifications` field for
`databricks.sdk.service.jobs.SubmitTask`.
* Added
[w.apps](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/apps.html)
workspace-level service and related dataclasses
* Added
[a.account_network_policy](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_network_policy.html)
account-level service and related dataclasses.

OpenAPI SHA: 5903bb39137fd76ac384b2044e425f9c56840e00, Date: 2023-10-23
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.

3 participants