Fix binarylane_server_reverse_name create hanging forever #4

Merged
benvin merged 1 commits from benvin/reverse-name-wait-fix into main 2026-10-17 12:29:33 +11:00
Member

binarylane_server_reverse_name polls its change_reverse_name action, which never reports complete even though the PTR is applied. The shared action wait also retries non-200 responses with no deadline, so create hangs indefinitely.

  • wait for the reverse name to appear on the server instead of polling the action
  • treat completed status as terminal and fail on a 404 action in waitForServerAction
  • apply a 20m default timeout when the caller context has no deadline
  • add httptest unit tests for the stuck action and wait outcomes
binarylane_server_reverse_name polls its change_reverse_name action, which never reports complete even though the PTR is applied. The shared action wait also retries non-200 responses with no deadline, so create hangs indefinitely. - wait for the reverse name to appear on the server instead of polling the action - treat `completed` status as terminal and fail on a 404 action in waitForServerAction - apply a 20m default timeout when the caller context has no deadline - add httptest unit tests for the stuck action and wait outcomes
unkin-agent added 1 commit 2026-10-16 23:51:14 +11:00
Wait for reverse names on the server and bound action waits
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
a9c133e73c
benvin merged commit 093c2e022a into main 2026-10-17 12:29:33 +11:00
benvin deleted branch benvin/reverse-name-wait-fix 2026-10-17 12:29:33 +11:00
Author
Member
  • nit: server_reverse_name_resource.go:266 — reverseName == nil returns right after the POST, so Delete no longer waits at all (it used to wait on the action for a 200) → poll until the IP no longer reports the old name, or say in the PR body that Delete is fire-and-forget now.
  • nit: server_reverse_name_resource.go:waitForReverseName — transport errors and every non-200 (401, 404 server gone, 5xx) are swallowed silently for the full 20m → return on 404/401/403 and include the last status in the timeout error.
  • nit: server_reverse_name_resource_unit_test.go — no test for a server that never reflects the PTR (the timeout branch) → add one with serverActionTimeout shortened via t.Cleanup.
- nit: server_reverse_name_resource.go:266 — `reverseName == nil` returns right after the POST, so Delete no longer waits at all (it used to wait on the action for a 200) → poll until the IP no longer reports the old name, or say in the PR body that Delete is fire-and-forget now. - nit: server_reverse_name_resource.go:waitForReverseName — transport errors and every non-200 (401, 404 server gone, 5xx) are swallowed silently for the full 20m → return on 404/401/403 and include the last status in the timeout error. - nit: server_reverse_name_resource_unit_test.go — no test for a server that never reflects the PTR (the timeout branch) → add one with `serverActionTimeout` shortened via t.Cleanup.
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-provider-binarylane#4