From 035417f3d0820e753f779947ef44e73c4e6b7b14 Mon Sep 17 00:00:00 2001 From: Sanyam Singhal Date: Fri, 10 Jan 2025 09:07:30 +0000 Subject: [PATCH] [DB-14827] Bug Fix: Migration Complexity Explanation empty in case of Oracle - updated html template to check for empty value --- 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 586610676..6fbea5cd4 100644 --- a/yb-voyager/cmd/assessMigrationCommand.go +++ b/yb-voyager/cmd/assessMigrationCommand.go @@ -1610,7 +1610,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 eeef96253..5d9dd1574 100644 --- a/yb-voyager/cmd/templates/migration_assessment_report.template +++ b/yb-voyager/cmd/templates/migration_assessment_report.template @@ -167,7 +167,7 @@ {{ end }} {{end}} - {{if ne .MigrationComplexity "NOT AVAILABLE"}} + {{if and (ne .MigrationComplexity "NOT AVAILABLE") (ne (len .MigrationComplexityExplanation) 0)}}

Migration Complexity Explanation

{{ .MigrationComplexityExplanation }}

{{end}}