From 0d479b2780eff10a64dbd23154521b251bc5e4b4 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Tue, 9 May 2023 14:29:09 -0400 Subject: [PATCH] verifyCNAMEAssertions should warn, not panic (#2340) Co-authored-by: Tom Limoncelli --- pkg/diff2/compareconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/diff2/compareconfig.go b/pkg/diff2/compareconfig.go index faaec057c..c22089ae0 100644 --- a/pkg/diff2/compareconfig.go +++ b/pkg/diff2/compareconfig.go @@ -156,13 +156,13 @@ func (cc *CompareConfig) verifyCNAMEAssertions() { if len(td.existingTargets) != 0 { if j != 0 { - panic("should not happen: (CNAME not in first position)") + fmt.Println("WARNING: should not happen: (CNAME not in FIRST position)") } } if len(td.desiredTargets) != 0 { if j != highest(ld.tdata) { - panic("should not happen: (CNAME not in last position)") + fmt.Println("WARNING: should not happen: (CNAME not in last position). There are multiple records on a label with a CNAME.") } } }