Skip to content

fix(redis): read Dragonfly/Valkey/Garnet version and max_clients - #557

Merged
cevheri merged 1 commit into
mainfrom
fix/redis-family-vendor-version
Sep 4, 2026
Merged

fix(redis): read Dragonfly/Valkey/Garnet version and max_clients#557
cevheri merged 1 commit into
mainfrom
fix/redis-family-vendor-version

Conversation

@kaya-abdullah

Copy link
Copy Markdown
Member

Description

The Redis-family provider's overview only read the redis_version INFO field for the version shown in the UI. Three of the five wire-compatible engines it serves (Valkey, DragonflyDB, Garnet) publish their own version in a separate INFO field (valkey_version, dragonfly_version, garnet_version), and the overview never read it, showing only the Redis compatibility level for all of them. DragonflyDB also publishes its connection limit under the underscored field name max_clients, while the provider only read maxclients, so the connections card always read no limit published for Dragonfly even though a real limit is published.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Related Issue

Closes #556

Changes Made

  • Added labelServerVersion() in src/lib/db/providers/keyvalue/redis.ts. getOverview() now shows Valkey, DragonflyDB and Garnet's own version labeled ahead of the Redis compatibility level, for example Dragonfly df-v1.40.1 (Redis 7.4.0), falling back to the bare compatibility level for KeyDB and plain Redis, which publish no version of their own.
  • getOverview() now reads Dragonfly's connection limit under the underscored max_clients field, falling back to maxclients. Garnet publishes no client-limit field under either name, so its connections card is unchanged.
  • Corrected the code comments and docs (src/lib/db/compatibility.ts, docs/providers/redis.md, docs/providers/README.md, README.md, DOCKERHUB.md, database-compose.yml) that described the old, unread behavior as the permanent, only available reading.
  • Corrected a stale DragonflyDB caveat left over from fix(redis): read the active session's user from CLIENT LIST's user field #524: active sessions read a numeric id before that fix, and now read default, but the caveat text still said numeric id.
  • Added integration tests in tests/integration/db/redis-provider.test.ts for the version labeling (Valkey, DragonflyDB, Garnet) and the max_clients fallback, and updated tests/unit/db/compatibility.test.ts to match the corrected caveats.

Testing

  • I have tested this locally
  • I have added/updated tests
  • All existing tests pass

Test Environment

  • LibreDB Studio Version: 0.13.7
  • Browser: Chrome, via Playwright
  • OS: Linux
  • Node.js/Bun Version: Bun 1.3.10
  • Database Type: Redis, Valkey, DragonflyDB, KeyDB, Garnet

Screenshots (if applicable)

None attached. Verified by connecting LibreDB Studio to live containers of all five engines and reading the rendered Monitoring, Overview panel and the api/db/monitoring response directly; the exact readings are under Additional Notes.

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published (not applicable, no dependent changes)

Additional Notes

Ran bun run format, lint, typecheck, knip, chart:check, channels:showcase:check, readme:check, security:check, the full test suite, bun run test:coverage plus coverage:check, bun run build and bun run build:lib. All pass; coverage is 100 percent (45493/45493 lines).

Live verification against real containers (redis:latest, valkey/valkey:latest, docker.dragonflydb.io/dragonflydb/dragonfly:latest, eqalpha/keydb:latest, ghcr.io/microsoft/garnet:2.1.5), connected through the app's own connection dialog and read from the rendered Monitoring, Overview panel:

  • DragonflyDB: version field Dragonfly df-v1.40.1 (Redis 7.4.0); connections 6/64000, previously no limit published.
  • Garnet: version field Garnet 2.1.5 (Redis 7.4.3); connections still read no limit published, unchanged, since Garnet publishes no client-limit field under either name.
  • Valkey: version field Valkey 9.1.1 (Redis 7.2.4).
  • Redis: version field 8.10.1, bare, no vendor label, confirming the fallback path is unaffected.
  • KeyDB: version field 6.3.4, bare, no vendor label, confirming the fallback path is unaffected.

Also checked on all five: SET and GET through the query editor, the key browser listing the written keys, and the Monitoring, Sessions tab rendering with no errors in the browser console or the dev server log.

…nfly's max_clients

Three of the five Redis-family engines publish their own version in a
separate INFO field beside redis_version (valkey_version, dragonfly_version,
garnet_version), and the overview never read it, so the version panel showed
only the Redis compatibility level for all of them. DragonflyDB also
publishes its connection limit under the underscored field name max_clients,
while the provider only read maxclients, so the connections card always read
no limit published for Dragonfly even though a real limit is published.

getOverview() now labels the version with the vendor's own field when one is
present, falling back to the bare compatibility level for KeyDB and plain
Redis, and reads max_clients as a fallback for the connection limit.

Corrects the code comments and provider docs that described the old,
unread behavior as the permanent, only available reading, and updates the
tests and the caveats registry to match.

Closes #556
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@cevheri
cevheri merged commit 5536120 into main Sep 4, 2026
27 checks passed
@cevheri
cevheri deleted the fix/redis-family-vendor-version branch September 4, 2026 21:21
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.

Redis provider does not show DragonflyDB, Valkey, or Garnet's own version, or Dragonfly's connection limit

2 participants