feat: Bump routing-api and Migrate Database GORM from jinzhu/gorm to gorm.io/gorm v2#536
Open
ZPascal wants to merge 1 commit intocloudfoundry:developfrom
Open
feat: Bump routing-api and Migrate Database GORM from jinzhu/gorm to gorm.io/gorm v2#536ZPascal wants to merge 1 commit intocloudfoundry:developfrom
ZPascal wants to merge 1 commit intocloudfoundry:developfrom
Conversation
bb1166a to
ecc1cff
Compare
1 task
This was referenced Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump
routing-apiand Migrate Database ORM fromjinzhu/gormtogorm.io/gormv2Summary
This PR updates the vendored
code.cloudfoundry.org/routing-apidependency to a newer version and migrates the database layer from the legacygithub.com/jinzhu/gorm(v1) andgithub.com/lib/pqstack to the moderngorm.io/gormv2 ecosystem, along with replacing the PostgreSQL driver fromlib/pqtojackc/pgx/v5.Changes
Dependency / Module Updates (
go.mod/go.sum)Removed direct dependencies:
github.com/jinzhu/gorm v1.9.16— legacy GORM v1github.com/lib/pq v1.11.2— legacy PostgreSQL drivergithub.com/go-sql-driver/mysql v1.9.3— moved to indirectAdded new indirect dependencies (GORM v2 + pgx stack):
gorm.io/gorm v1.31.1gorm.io/driver/mysql v1.6.0gorm.io/driver/postgres v1.6.0github.com/jackc/pgx/v5 v5.8.0— modern PostgreSQL drivergithub.com/jackc/pgpassfile,pgservicefile,puddle/v2— pgx dependenciesgithub.com/jinzhu/now v1.1.5— updated GORM v2 helperRemoved:
github.com/denisenkom/go-mssqldb— no longer neededgithub.com/erikstmartin/go-testdb— no longer neededgithub.com/golang-sql/civil— no longer neededgithub.com/PuerkitoBio/goquery,andybalholm/cascadia— no longer neededBOSH Package Spec (
packages/routing-api/spec)The BOSH package spec for
routing-apihas been updated to reflect the new dependency tree:github.com/jinzhu/gorm(v1 dialects for MySQL and PostgreSQL) andgithub.com/lib/pq(all sub-packages).jackc/pgx/v5package tree (core,pgconn,pgproto3,pgtype,pgxpool,stdlib, internal helpers) andjackc/puddle/v2.gorm.io/gorm,gorm.io/driver/mysql,gorm.io/driver/postgresand all their sub-packages.golang.org/x/sync/semaphore,golang.org/x/text/cases,golang.org/x/text/secure/precis,golang.org/x/text/width,golang.org/x/text/internal.tedsuo/ifrit/grouperandtedsuo/ifrit/sigmonsub-packages.Motivation
jinzhu/gorm(v1) is unmaintained and does not receive security updates. The newgorm.io/gormv2 is the actively maintained successor with a cleaner API. Similarly,lib/pqis in maintenance-only mode, whilejackc/pgx/v5is the recommended, actively developed PostgreSQL driver with better performance and full support for modern PostgreSQL features (e.g., pgx protocol-level prepared statements, connection pooling viapgxpool).Checklist
go.mod/go.sumupdatedpackages/routing-api/spec)Backward Compatibility
Breaking Change: No
Notes