Repository navigation
refactor(fabric)!: remove unused SQL NewDriver wrappers and TracingConfig - #2058
Conversation
|
Hey @entrepreneurme 👋 thanks for the PR! This comment updates automatically as you push changes -- think of it as your PR's live scoreboard! PR Checks✅ DCO Sign-off -- All commits have valid sign-offs. Nice work! ❌ GPG Signature -- Heads up! The following commits don't have a verified GPG signature:
You'll need to sign your commits with GPG (e.g. ✅ Merge Conflicts -- No merge conflicts detected. Smooth sailing! ✅ Issue Link -- Linked to #2005 (assigned to you). ⏳ All checks must pass before this PR can be reviewed. You've got this! |
mbrandenburger
left a comment
There was a problem hiding this comment.
Thank you @entrepreneurme for working on this!
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
…nfig Production wires the fabric SQL drivers through NewNamedDriver. The one-line NewDriver wrappers and the empty fabric TracingConfig were never used. Signed-off-by: Ujjwal Khandelwal <ujjwal.khandelwal@yahoo.com>
bb37240 to
68f7e09
Compare
What and why
The fabric SDK (
platform/fabric/sdk/dig/sdk.go) builds its SQL persistence drivers withsqlite.NewNamedDriverandpostgres.NewNamedDriver, which callNewDriverWithDbProvider.sqlite.NewDriverandpostgres.NewDriverare one-line wrappers aroundNewDriverWithDbProviderwith no callers in any FSC module. The fabriccommon.TracingConfigis an empty struct with no references; the SQL drivers use the view-packageTracingConfig.This PR removes the two wrappers, the postgres test that covered only the wrapper, and the fabric
TracingConfig.Fixes #2005
Breaking changes
These exported symbols are removed:
platform/fabric/services/db/driver/sql/sqlite.NewDriverplatform/fabric/services/db/driver/sql/postgres.NewDriverplatform/fabric/services/db/driver/sql/common.TracingConfigMigration:
sqlite.NewDriver(cfg)→sqlite.NewDriverWithDbProvider(cfg, sqlite2.NewDbProvider()), withsqlite2=platform/view/services/storage/driver/sql/sqlitepostgres.NewDriver(cfg)→postgres.NewDriverWithDbProvider(cfg, postgres2.NewDbProvider()), withpostgres2=platform/view/services/storage/driver/sql/postgrescommon.TracingConfig→platform/view/services/storage/driver/sql/common.TracingConfigPanurus (
mainat0dd0f85) does not import these packages, so it is not affected.How it was verified
grepacross all FSC modules finds no remaining use of the removed symbols.go test ./platform/fabric/services/db/driver/sql/postgres -run 'TestNewDriverWithDbProvider|TestNewNamedDriver'passes.go test ./platform/fabric/services/db/driver/sql/common/passes.go test ./platform/fabric/services/db/driver/sql/sqlitecompiles the package, which has no tests.Not changed
The view-package
sqlite.NewDriver,postgres.NewDriverandTracingConfig, and the fabricmemory.NewDriver, are separate symbols. They stay, and tests across fabric, fabricx and view callmemory.NewDriver.