Add --dry-run mode to preview DNS changes without applying them #5

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

Introduce a --dry-run option to pb-dydns.php and UpdateDnsCommand that performs all logic except the actual DNS update. This allows users to see what would change without modifying any records.

Proposed behavior

  • Detect --dry-run in CLI arguments
  • Perform all API reads (ping, retrieve)
  • Compare current DNS values with the public IP
  • Print what would be updated
  • Do not call edit()
  • Do not write to logs

Benefits

  • Safe testing before deploying
  • Useful for debugging configuration issues
  • Helps users understand what the tool is doing

Notes

  • Should not change default behavior
  • Requires additional tests for dry‑run output
Introduce a --dry-run option to `pb-dydns.php` and `UpdateDnsCommand` that performs all logic except the actual DNS update. This allows users to see what would change without modifying any records. **Proposed behavior** - Detect --dry-run in CLI arguments - Perform all API reads (ping, retrieve) - Compare current DNS values with the public IP - Print what would be updated - Do not call edit() - Do not write to logs **Benefits** - Safe testing before deploying - Useful for debugging configuration issues - Helps users understand what the tool is doing **Notes** - Should not change default behavior - Requires additional tests for dry‑run output
mon self-assigned this 2026-04-07 10:58:32 +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#5
No description provided.