From e44dc10d9df17d3aef16467a9451a0a358b1a7ab Mon Sep 17 00:00:00 2001 From: Sanyam Singhal Date: Fri, 17 Jan 2025 16:09:18 +0530 Subject: [PATCH] [DB-14827] Bug Fix: Migration Complexity Explanation empty in case of Oracle (#2171) - updated html template to check for empty value before adding Migration Complexity Explanation heading. --- yb-voyager/cmd/assessMigrationCommand.go | 2 +- yb-voyager/cmd/templates/migration_assessment_report.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yb-voyager/cmd/assessMigrationCommand.go b/yb-voyager/cmd/assessMigrationCommand.go index 905bac4fd..556ddb577 100644 --- a/yb-voyager/cmd/assessMigrationCommand.go +++ b/yb-voyager/cmd/assessMigrationCommand.go @@ -1607,7 +1607,7 @@ func generateAssessmentReportJson(reportDir string) error { if err != nil { return fmt.Errorf("unable to build migration complexity explanation for json report: %w", err) } - log.Info(assessmentReport.MigrationComplexityExplanation) + log.Infof("migration complexity explanation: %q", assessmentReport.MigrationComplexityExplanation) strReport, err := json.MarshalIndent(assessmentReport, "", "\t") if err != nil { diff --git a/yb-voyager/cmd/templates/migration_assessment_report.template b/yb-voyager/cmd/templates/migration_assessment_report.template index 9f4f4a97a..894ba5121 100644 --- a/yb-voyager/cmd/templates/migration_assessment_report.template +++ b/yb-voyager/cmd/templates/migration_assessment_report.template @@ -272,7 +272,7 @@ {{ end }} {{end}} - {{if ne .MigrationComplexity "NOT AVAILABLE"}} + {{if and (ne .MigrationComplexity "NOT AVAILABLE") (ne (len .MigrationComplexityExplanation) 0)}}

Migration Complexity Explanation

{{ .MigrationComplexityExplanation }}

{{end}}