Skip to content

Commit

Permalink
changes as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyamsinghal committed Jan 8, 2025
1 parent 3ca100c commit afe39a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion yb-voyager/cmd/analyzeSchema.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ func convertIssueInstanceToAnalyzeIssue(issueInstance queryissue.QueryIssue, fil
ObjectName: displayObjectName,
Reason: issueInstance.Name,
Type: issueInstance.Type,
Impact: issueInstance.GetImpact(),
Impact: issueInstance.Impact,
SqlStatement: issueInstance.SqlStatement,
DocsLink: issueInstance.DocsLink,
FilePath: fileName,
Expand Down
8 changes: 0 additions & 8 deletions yb-voyager/src/issue/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ limitations under the License.
package issue

import (
"github.com/samber/lo"
"github.com/yugabyte/yb-voyager/yb-voyager/src/constants"
"github.com/yugabyte/yb-voyager/yb-voyager/src/ybversion"
)

Expand All @@ -44,11 +42,6 @@ func (i Issue) IsFixedIn(v *ybversion.YBVersion) (bool, error) {
return v.GreaterThanOrEqual(minVersionFixedInSeries), nil
}

func (i Issue) GetImpact() string {
// Default value as IMPACT_LEVEL_1 if not defined in issue
return lo.Ternary(i.Impact != "", i.Impact, constants.IMPACT_LEVEL_1)
}

/*
Dynamic Impact Determination (TODO)
- We can define the impact calculator function based on issue type wherever/whenever needed
Expand All @@ -72,7 +65,6 @@ func (i Issue) GetImpact() string {
return "LEVEL_3"
}
// Update existing GetImpact() method
func (i Issue) GetImpact(stats *PgStats) string {
if calc, ok := impactCalculators[i.Type]; ok {
return calc(i, stats)
Expand Down

0 comments on commit afe39a0

Please sign in to comment.