Repository navigation
Conversation
…fails a push The LuaDNS API occasionally answers a valid request with a 5xx. Repeat requests that cannot create anything twice (updates, deletes, reads) after a 500/502/503/504, with a doubling pause. Repeat every request after a 429. Creates (POST) are not repeated after a 5xx, since the first attempt may have succeeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
The integration tests were failing occasionally. I asked Claude to take a look, and it concluded the 500s were LUA's fault, not ours. It suggested retrying 500s and wrote this solution, which seems rather large for a small problem. I asked it to create a smaller solution. It created #5042 which isn't as clean but doesn't rewrite the entire retry mechanism. I'm ok with either solution. As the maintainer, do you have a preference? |
Contributor
|
Thank you. Since there are few corrections needed, #5042 seems like a better choice. |
TomOnTime
added a commit
that referenced
this pull request
Oct 27, 2026
…" fails a push (#5042) ## Problem Integration tests on LUADNS occasionally fail with a 500 on a valid update: ``` ± MODIFY ***-luadns.com HTTPS (3 example.com. alpn="h2,h3" port="999" ech="some+base64+encoded+value///" ttl=300) -> (3 example.com. alpn="h2" port="80" ech="some+base64+encoded+value///" ttl=300) Server returned bad status code (500) ``` The payload is deterministic and the same shape succeeds in the previous test step, so this looks like a transient server-side error. ## Fix A small `retry500` helper in `luadnsProvider.go` retries a request up to 3 times (pausing 2s, then 4s) when the API returns a 500. It is used only for `UpdateManyRecords` and `DeleteManyRecords`, which are safe to repeat. Creates are not retried, since the first attempt may have succeeded. This is a smaller alternative to #5041 (no new files; no 429 / other 5xx handling; reads untouched). ## Testing - `go test ./providers/luadns` passes. - Not yet re-run against the live LuaDNS integration tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Integration tests on LUADNS occasionally fail with a 500:
Cause
The payload appears valid: reproducing test 19 locally produces
3 example.com. alpn=h2 port=80 ech=some+base64+encoded+value///, which has the same shape as test 18's PATCH that succeeds with the same ECH value. Since the content we send is deterministic and the failure is intermittent, this looks like a transient server-side error. (luadns-godiscards the 500 response body, so the server's reason isn't visible.)Fix
New
providers/luadns/retry.go, following the policy inproviders/mittwald/retry.go:All LuaDNS API calls now go through the helper, which also does the rate-limiter wait.
Testing
retry_test.gocovers the retry/no-retry cases.go test ./providers/luadnspasses;go build ./...passes.🤖 Generated with Claude Code