Skip to content

Fix standalone Valkey connection EOF#18

Merged
chistopat merged 1 commit intomainfrom
fix-standalone-valkey
Feb 21, 2026
Merged

Fix standalone Valkey connection EOF#18
chistopat merged 1 commit intomainfrom
fix-standalone-valkey

Conversation

@chistopat
Copy link
Copy Markdown
Member

Problem

rueidis tries CLUSTER topology discovery by default. Standalone Valkey (e.g. fsqr-valkey) returns error on CLUSTER command, causing EOF on connect.

Fix

Add ForceSingleClient: true to rueidis ClientOption — skips cluster discovery for standalone instances.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 18, 2026

Total coverage threshold (65%) satisfied: PASS
Total test coverage: 66.7% (1987/2980)

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Feb 18, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.05% (target: -1.00%) 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (48e3fd8) 6082 3045 50.07%
Head commit (32c1dd5) 6088 (+6) 3045 (+0) 50.02% (-0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#18) 14 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@chistopat chistopat force-pushed the fix-standalone-valkey branch from 8e5c218 to 44339c4 Compare February 18, 2026 16:59
rueidis tries CLUSTER topology discovery by default, which fails with
EOF on standalone Valkey instances. Add WithStandalone() SDK option and
Standalone field in Valkey store Config to set ForceSingleClient.
@chistopat chistopat force-pushed the fix-standalone-valkey branch from 44339c4 to 32c1dd5 Compare February 18, 2026 17:01
@chistopat
Copy link
Copy Markdown
Member Author

@greptile

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 21, 2026

Greptile Summary

Fixed EOF error when connecting to standalone Valkey by adding ForceSingleClient: true to rueidis ClientOption. The fix adds a new WithStandalone() SDK option that skips cluster topology discovery, preventing the connection failure when standalone instances reject CLUSTER commands.

  • Added Standalone bool field to internal/db/valkey/client.go:Config
  • Wired it through pkg/sdk/options.go:clientConfig to SDK public API
  • Passed to rueidis as ForceSingleClient option

The implementation is clean and follows existing patterns. Consider whether the Redis backend (internal/db/redis/client.go) needs the same fix, as standalone Redis instances also reject CLUSTER commands by default.

Confidence Score: 5/5

  • Safe to merge — straightforward fix with clear intent
  • Simple boolean flag addition following existing config patterns, no breaking changes, solves documented connection issue
  • Consider applying same fix to internal/db/redis/client.go for standalone Redis instances

Important Files Changed

Filename Overview
internal/db/valkey/client.go Added Standalone field to Config and wired it to ForceSingleClient option to skip cluster discovery
pkg/sdk/client.go Passed standalone config field through to Valkey store initialization
pkg/sdk/options.go Added WithStandalone() option to disable cluster topology discovery

Last reviewed commit: 32c1dd5

@chistopat chistopat merged commit 908f06a into main Feb 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant