-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not add the feature in UnsupportedFeatures field if there are no objects for it in the JSON report #2110
Conversation
…there are no object for it in the JSON report
@@ -947,7 +947,7 @@ func areMinVersionsFixedInEqual(m1 map[string]*ybversion.YBVersion, m2 map[strin | |||
return true | |||
} | |||
|
|||
func getUnsupportedFeaturesFromSchemaAnalysisReport(featureName string, issueReason string, schemaAnalysisReport utils.SchemaReport, displayDDLInHTML bool, description string) UnsupportedFeature { | |||
func getUnsupportedFeaturesFromSchemaAnalysisReport(featureName string, issueReason string, schemaAnalysisReport utils.SchemaReport, displayDDLInHTML bool, description string) *UnsupportedFeature { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing it to pointer, how about we keep the return type same.
And define EMPTY_UNSUPPORTED_FEATURE and return that, and later filter that out of the final array.
var EMPTY_UNSUPPORTED_FEATURE = UnsupportedFeature{}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the way to not make pointer changes, but just filter at the end if there are objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking out loud after looking at the expected test results.
In case of UnsupportedFeatures it is null if there is nothing,
Whereas in case of migration caveats its a empty list - []
can we have the same behaviour in both cases
Describe the changes in this pull request
Modified the code to not put the Feature in the UnsupportedFeatures field of the struct in case there are no objects for making JSON report cleaner. This will also help developers not to update the expected files every time we add new feature.
Describe if there are any user-facing changes
Json report will not have feature if there are no objects
How was this pull request tested?
Existing tests
https://jenkins.dev.yugabyte.com/job/users/job/yb-voyager-testing/job/yb-voyager-testing-pipeline/4300/ - 1 intermittent failure
https://jenkins.dev.yugabyte.com/job/users/job/yb-voyager-testing/job/yb-voyager-testing-pipeline/4301
Does your PR have changes that can cause upgrade issues?