refactor(queue)!: own the redis connection instead of borrowing one - #61
Merged
Conversation
The queue extension imported the database extension for one reason: when DatabaseRedisConnection was set it pulled a Redis client out of the database manager's pool rather than dialling its own. That was the last real compile time dependency on extensions/database outside the extension itself. It cannot move to grove, because grove has no Redis driver. It ships clickhouse, elasticsearch, mongo, mysql, postgres, sqlite and turso, and that is the whole list. So the borrowing goes rather than moves. Nothing else had to change. NewRedisQueue already dialled its own connection, and that path is now the only one. Configure Redis under the queue's own url or hosts the way every other driver here already works. BREAKING CHANGE: the database_redis_connection option is removed, along with WithDatabaseRedisConnection and Config.DatabaseRedisConnection. If you were sharing a Redis connection with the database extension, give the queue its own url or hosts. Queue now declares no extension dependencies at all.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Conventional Commits ValidationPR Title: valid |
This was referenced Aug 18, 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.
Groundwork for removing
extensions/database. This was the last real compile-time dependency on it outside the extension itself.What it was doing
The queue extension imported the database extension for exactly one reason. When
DatabaseRedisConnectionwas set, it pulled a Redis client out of the database manager's pool instead of dialling its own:Note what that is: not a database, a Redis connection it borrowed from something that happened to hold one.
Why it is removed rather than migrated
It cannot move to grove. Grove has no Redis driver. It ships clickhouse, elasticsearch, mongo, mysql, postgres, sqlite and turso, and that is the whole list. There is nothing to point the borrowing at.
So the borrowing goes.
NewRedisQueuealready dialled its own connection and that path is now the only one, which is how every other driver in this extension already worked.What changed
extension.go: the import, the fail-fast check, and the borrowed-client branch are gone.Dependencies()now returns nil, because the queue owns every connection it uses.config.go:DatabaseRedisConnection,WithDatabaseRedisConnection, and the two validation branches that existed to let Redis skipurl/hosts.redis.go:NewRedisQueue's guard no longer accepts a database connection as a substitute forurlorhosts.go.mod: the require and thereplace ../database.Verification
go build,go vetandgofmtare clean. The suite passes apart fromTestNATSQueue_PublishConsume, which needs a live NATS broker. I confirmed that one fails identically on unmodifiedmain, so it is not from this change.Breaking change
database_redis_connectionis removed. If you were sharing a Redis connection with the database extension, give the queue its ownurlorhosts.Not included
extensions/databasestill exists. Removing it also needs the CLI work inchore/cli-grove-migrationand a decision about the nine model base typesforge generate modelemits, which have no grove equivalent.