1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Don't count diff2.REPORT (informational warnings) as a "correction" (#2361)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Tom Limoncelli
2023-05-16 10:42:08 -04:00
committed by GitHub
parent 84e39b4ae2
commit 66a76c44c1
10 changed files with 90 additions and 61 deletions

View File

@ -62,7 +62,13 @@ func (d *differCompat) IncrementalDiff(existing []*models.RecordConfig) (unchang
case diff2.REPORT:
// Sadly the NewCompat function doesn't have an equivalent. We
// just output the messages now.
fmt.Print("INFO: ")
fmt.Println(inst.MsgsJoined)
// TODO(tlim): When diff1 is deleted, IncremtntalDiff should add a
// parameter to list the REPORT messages. It can also eliminate the
// first parameter (existing) since nobody uses that in the diff2
// world.
case diff2.CREATE:
cor.Desired = inst.New[0]
toCreate = append(toCreate, cor)