Add retry logic for Porkbun API calls to improve reliability #3

Open
opened 2026-04-07 10:26:54 +01:00 by mon · 0 comments
Owner

Right now, UpdateDnsCommand performs single‑attempt calls to the Porkbun API, i.e. ping(), retrieve(), edit(). If any of these calls fail due to transient network issues, temporary Porkbun downtime, or slow responses, the entire command returns an error immediately.

This works, but it makes the updater sensitive to short‑lived failures — especially when running under cron.

Proposed enhancement

Introduce a small retry mechanism around API calls, with a limited number of attempts and a short delay between them. This would make the updater more resilient without changing its external behavior.

Benefits

  • Reduces false negatives caused by temporary network hiccups
  • Improves reliability in cron/systemd environments
  • Makes the updater more robust without altering its public API
Right now, `UpdateDnsCommand` performs single‑attempt calls to the Porkbun API, i.e. `ping()`, `retrieve()`, `edit()`. If any of these calls fail due to transient network issues, temporary Porkbun downtime, or slow responses, the entire command returns an error immediately. This works, but it makes the updater sensitive to short‑lived failures — especially when running under _cron_. **Proposed enhancement** Introduce a small retry mechanism around API calls, with a limited number of attempts and a short delay between them. This would make the updater more resilient without changing its external behavior. **Benefits** - Reduces false negatives caused by temporary network hiccups - Improves reliability in _cron_/_systemd_ environments - Makes the updater more robust without altering its public API
mon self-assigned this 2026-04-07 10:27:09 +01:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mon/pb-dydns#3
No description provided.