-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix for generating report from multiple different databases #33
Conversation
pkg/reporter/reporter.go
Outdated
mc := collector.NewMetricsCollector(db.DB) | ||
metricsCollection, err := mc.Collect(testRun) | ||
if err != nil { | ||
continue |
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.
Will it be okay to add some debug/warn level log message, In case if we are unable to process the metric for some of SC/DB.
pkg/reporter/reporter.go
Outdated
if err != nil { | ||
continue | ||
} |
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.
I agree with @adarsh-dell. Along with logger you can move line 131 inside this if block. This way we can remove testRunFound variable.
if err != nil { | |
continue | |
} | |
if err != nil { | |
log.Warnf("A warning message..") | |
invalidTestRuns = append(invalidTestRuns, testRun) | |
continue | |
} |
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.
lgtm
Description
Fixed the generation of report for the test runs from multiple different databases
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
Ran make test
Verified by generating report for multiple test runs from different databases. No errors received.