AKAMAIEDGEDNS: Adopt diff2 in compatibility mode (#1872)

This commit is contained in:
Tom Limoncelli 2023-01-23 15:26:41 -05:00 committed by GitHub
parent ec1d91ae88
commit 22c6797f83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,9 +123,13 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
txtutil.SplitSingleLongTxt(dc.Records)
var corrections []*models.Correction
if !diff2.EnableDiff2 || true { // Remove "|| true" when diff2 version arrives
keysToUpdate, err := (diff.New(dc)).ChangedGroups(existingRecords)
var keysToUpdate map[models.RecordKey][]string
if !diff2.EnableDiff2 {
keysToUpdate, err = (diff.New(dc)).ChangedGroups(existingRecords)
} else {
keysToUpdate, err = (diff.NewCompat(dc)).ChangedGroups(existingRecords)
// TODO(tlim): In the future please adopt `pkg/diff2/By*()`
}
if err != nil {
return nil, err
}
@ -220,11 +224,6 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
printer.Debugf("autoDNSSecEnable: Disable AutoDnsSec for zone %s\n", dc.Name)
}
return corrections, nil
}
// Insert Future diff2 version here.
return corrections, nil
}