diff --git a/api/v1/interface.go b/api/v1/interface.go index c168fb89..0fbb3d56 100644 --- a/api/v1/interface.go +++ b/api/v1/interface.go @@ -123,7 +123,11 @@ func (r ChangeResult) PatchesMap() map[string]any { } func (c ChangeResult) String() string { - return fmt.Sprintf("%s/%s: %s", c.ConfigType, c.ExternalID, c.ChangeType) + if c.ConfigID == "" { + return fmt.Sprintf("{%s/%s}, {%s/%s}", c.ConfigType, c.ExternalID, c.ChangeType, c.ExternalChangeID) + } + + return fmt.Sprintf("{%s}, {%s/%s}", c.ConfigID, c.ChangeType, c.ExternalChangeID) } func (result AnalysisResult) String() string { diff --git a/db/update.go b/db/update.go index 3fbbabf4..547c01cd 100644 --- a/db/update.go +++ b/db/update.go @@ -274,7 +274,7 @@ func shouldExcludeChange(result *v1.ScrapeResult, changeResult v1.ChangeResult) for _, expr := range exclusions { if res, err := gomplate.RunTemplate(env, gomplate.Template{Expression: expr}); err != nil { - return false, fmt.Errorf("failed to evaluate change exclusion expression(%s): %w", expr, err) + return false, fmt.Errorf("[%s] change exclusion expression failed (%s): %w", changeResult, expr, err) } else if skipChange, err := strconv.ParseBool(res); err != nil { return false, fmt.Errorf("change exclusion expression(%s) didn't evaluate to a boolean: %w", expr, err) } else if skipChange {