|  | 
|  | 1 | +# Breaking Changes | 
|  | 2 | + | 
|  | 3 | +## Version 1.6 (Upcoming) | 
|  | 4 | + | 
|  | 5 | +### libdns 1.0 Compatibility | 
|  | 6 | + | 
|  | 7 | +Version 1.6 requires **libdns v1.0** or later. The libdns v1.0 release introduced typed record structs that replace the generic `libdns.Record` type. This is a fundamental change to the libdns API. | 
|  | 8 | + | 
|  | 9 | +#### What Changed in libdns 1.0 | 
|  | 10 | + | 
|  | 11 | +- **Typed Records**: Instead of using generic `libdns.Record` structs, libdns v1.0 introduced typed record implementations like `libdns.Address`, `libdns.TXT`, `libdns.SRV`, etc. | 
|  | 12 | +- **Parse() Method**: The new `Record` interface includes a `Parse()` method that returns typed structs | 
|  | 13 | +- **RR() Method**: All record types implement `RR()` to get the underlying resource record data | 
|  | 14 | + | 
|  | 15 | +#### Migration for libdns 1.0 | 
|  | 16 | + | 
|  | 17 | +See the [libdns documentation](https://pkg.go.dev/github.com/libdns/libdns) for complete details on migrating to typed records. | 
|  | 18 | + | 
|  | 19 | +Example of the new API: | 
|  | 20 | +```go | 
|  | 21 | +// Old (libdns <1.0) | 
|  | 22 | +records := []libdns.Record{ | 
|  | 23 | +    { | 
|  | 24 | +        Type:  "A", | 
|  | 25 | +        Name:  "www", | 
|  | 26 | +        Value: "1.2.3.4", | 
|  | 27 | +        TTL:   300 * time.Second, | 
|  | 28 | +    }, | 
|  | 29 | +} | 
|  | 30 | + | 
|  | 31 | +// New (libdns >=1.0) | 
|  | 32 | +records := []libdns.Record{ | 
|  | 33 | +    libdns.Address{ | 
|  | 34 | +        Name:  "www", | 
|  | 35 | +        Value: netip.MustParseAddr("1.2.3.4"), | 
|  | 36 | +        TTL:   300 * time.Second, | 
|  | 37 | +    }, | 
|  | 38 | +} | 
|  | 39 | +``` | 
|  | 40 | + | 
|  | 41 | +### Field Renames | 
|  | 42 | + | 
|  | 43 | +Two provider configuration fields have been renamed for clarity: | 
|  | 44 | + | 
|  | 45 | +#### 1. `MaxWaitDur` → `Route53MaxWait` | 
|  | 46 | + | 
|  | 47 | +**Old (pre-v1.6):** | 
|  | 48 | +```go | 
|  | 49 | +provider := &route53.Provider{ | 
|  | 50 | +    MaxWaitDur: 60,  // Was treated as seconds (multiplied by time.Second internally) | 
|  | 51 | +} | 
|  | 52 | +``` | 
|  | 53 | + | 
|  | 54 | +**New (v1.6+):** | 
|  | 55 | +```go | 
|  | 56 | +provider := &route53.Provider{ | 
|  | 57 | +    Route53MaxWait: 60 * time.Second,  // Use proper time.Duration | 
|  | 58 | +} | 
|  | 59 | +``` | 
|  | 60 | + | 
|  | 61 | +**Important:** In versions before v1.6, `MaxWaitDur` was silently multiplied by `time.Second` in the provider's init function. This was non-idiomatic Go and has been fixed. You must now provide a proper `time.Duration` value (like `60 * time.Second` or `2 * time.Minute`), as is standard in Go. | 
|  | 62 | + | 
|  | 63 | +**Failure to multiply by `time.Second` will result in a 60-nanosecond timeout instead of 60 seconds!** | 
|  | 64 | + | 
|  | 65 | +**Rationale:** The new name clearly indicates this is a Route53-specific timeout for AWS internal propagation, not general DNS propagation. | 
|  | 66 | + | 
|  | 67 | +#### 2. `WaitForPropagation` → `WaitForRoute53Sync` | 
|  | 68 | + | 
|  | 69 | +**Old (pre-v1.6):** | 
|  | 70 | +```go | 
|  | 71 | +provider := &route53.Provider{ | 
|  | 72 | +    WaitForPropagation: true, | 
|  | 73 | +} | 
|  | 74 | +``` | 
|  | 75 | + | 
|  | 76 | +**New (v1.6+):** | 
|  | 77 | +```go | 
|  | 78 | +provider := &route53.Provider{ | 
|  | 79 | +    WaitForRoute53Sync: true, | 
|  | 80 | +} | 
|  | 81 | +``` | 
|  | 82 | + | 
|  | 83 | +**Rationale:** The new name clearly indicates this waits for Route53's internal synchronization, not worldwide DNS propagation (which can take hours depending on TTL values). | 
|  | 84 | + | 
|  | 85 | +### JSON Configuration | 
|  | 86 | + | 
|  | 87 | +If you're using JSON configuration, update your field names: | 
|  | 88 | + | 
|  | 89 | +**Old (pre-v1.6):** | 
|  | 90 | +```json | 
|  | 91 | +{ | 
|  | 92 | +  "max_wait_dur": 60, | 
|  | 93 | +  "wait_for_propagation": true | 
|  | 94 | +} | 
|  | 95 | +``` | 
|  | 96 | + | 
|  | 97 | +**New (v1.6+):** | 
|  | 98 | +```json | 
|  | 99 | +{ | 
|  | 100 | +  "route53_max_wait": "2m", | 
|  | 101 | +  "wait_for_route53_sync": true | 
|  | 102 | +} | 
|  | 103 | +``` | 
|  | 104 | + | 
|  | 105 | +Note: The old `max_wait_dur` field accepted a numeric value (seconds), while the new `route53_max_wait` field uses standard Go duration strings like `"2m"`, `"120s"`, etc. | 
|  | 106 | + | 
|  | 107 | +## Migration Checklist | 
|  | 108 | + | 
|  | 109 | +- [ ] Update to libdns v1.0+ (see libdns documentation for typed records) | 
|  | 110 | +- [ ] Rename `MaxWaitDur` to `Route53MaxWait` in your code | 
|  | 111 | +- [ ] Change from plain integer (e.g., `60`) to proper `time.Duration` (e.g., `60 * time.Second`) | 
|  | 112 | +- [ ] Rename `WaitForPropagation` to `WaitForRoute53Sync` in your code | 
|  | 113 | +- [ ] Update JSON/YAML configuration files with new field names | 
|  | 114 | +- [ ] Test your code thoroughly after migration | 
0 commit comments