-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove unneeded loading of the MySQL driver #15502
Remove unneeded loading of the MySQL driver #15502
Conversation
These cases probably at some point actually used MySQL with Go's stdlib `database/sql` logic, but no longer do. This is mostly testing logic except for `vtorc`. The initial code port from Orchestrator to `vtorc` likely kept the logic for a MySQL backend but we've long since only had `vtorc` using `sqlite` internally. Signed-off-by: Dirkjan Bussink <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15502 +/- ##
==========================================
- Coverage 67.41% 65.66% -1.76%
==========================================
Files 1560 1563 +3
Lines 192752 194474 +1722
==========================================
- Hits 129952 127707 -2245
- Misses 62800 66767 +3967 ☔ View full report in Codecov by Sentry. |
Move loading the driver to where we also `sql.Open` the `sqlite` driver. We don't need any generic logic and `GetGenericDB` is not called from anywhere, so let's clean that up too. Signed-off-by: Dirkjan Bussink <[email protected]>
@@ -28,6 +28,8 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
_ "modernc.org/sqlite" |
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.
Load it here since here is also where we do sql.Open
.
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
These cases probably at some point actually used MySQL with Go's stdlib
database/sql
logic, but no longer do.This is mostly testing logic except for
vtorc
. The initial code port from Orchestrator tovtorc
likely kept the logic for a MySQL backend but we've long since only hadvtorc
usingsqlite
internally.Checklist