Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Allow setting status codes to retry #152

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

julienduchesne
Copy link
Member

For grafana/terraform-provider-grafana#893
We currently retry 429 and 5xx. This is retained as a default in this PR but there's a new RetryStatusCodes that, if set, overrides these statuses
That way, the user that opened the issue above will be able to also retry 407 on their Azure instance

Had to do some fixes in dashboard tests, the httptest servers were not properly used, not closed and leaked out of the tests

For grafana/terraform-provider-grafana#893
We currently retry 429 and 5xx. This is retained as a default in this PR but there's a new `RetryStatusCodes` that, if set, overrides these statuses
That way, the user that opened the issue above will be able to also retry 407 on their Azure instance

**Had to do some fixes in dashboard tests, the httptest servers were not properly used, not closed and leaked out of the tests**
@julienduchesne julienduchesne requested a review from a team June 5, 2023 16:18
@inkel
Copy link
Contributor

inkel commented Jun 6, 2023

Had to do some fixes in dashboard tests, the httptest servers were not properly used, not closed and leaked out of the tests

Perhaps these should have been done in a previous PR? 🤔

@julienduchesne
Copy link
Member Author

Had to do some fixes in dashboard tests, the httptest servers were not properly used, not closed and leaked out of the tests

Perhaps these should have been done in a previous PR? 🤔

Hard to reproduce the bug in another PR because they didn't fail until you added a new test that used a httptest server. Probably because of test ordering

@julienduchesne julienduchesne merged commit 023cfdf into master Jun 6, 2023
2 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/custom-status-code-retry branch June 6, 2023 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants