• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 26084919397

19 May 2026 08:13AM UTC coverage: 65.475% (-0.04%) from 65.512%
26084919397

push

github

web-flow
Bump toolhive-core to v0.0.21 and use shared redis client (#5318)

* Bump toolhive-core to v0.0.21 and use shared redis client

The auth-server's storage package carried its own copy of the Redis
connection layer (config types, TLS dialer, per-mode client construction,
topology validation, timeout defaults). toolhive-core v0.0.21 ships a
shared redis package designed to replace those duplicates so the next
consumer migration can move stacklok-llm-gateway onto the same library
without further drift.

Replace the local RedisConfig/SentinelConfig/RedisTLSConfig/ACLUserConfig
types and the buildTLSConfig/newTLSDialer/configureTLSDialer/validateConfig
helpers with toolhive-core/redis.Config and NewClient. NewRedisStorage now
takes a tcredis.Config plus the auth-server-specific keyPrefix; the
constructor keeps the auth-server invariants (ACL password required, key
prefix required) and delegates topology validation, defaults, TLS plumbing,
and Ping verification to the shared package.

The runner's convertRedisRunConfig now produces a tcredis.Config (ACL
credentials resolved from env vars, durations parsed, CA cert file read).
Topology checks that duplicated tcredis's Validate were dropped — those
errors now surface from the shared package.

Tests: delete the storage-side TLS helper tests (now exercising dependency
code), trim the validation table down to the auth-server-specific cases,
table-drive the three connection-failure tests, remove runner-side
topology validation subtests, and update the env-var subtests to the new
field layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Return named struct from convertRedisACLConfig

Returning (username, password string, error) made it possible to swap
the two same-typed values silently at the call site. Introduce an
unexported redisACLCredentials struct so the role of each field is
visible at the assignment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

-------... (continued)

27 of 31 new or added lines in 2 files covered. (87.1%)

5 existing lines in 2 files now uncovered.

64658 of 98752 relevant lines covered (65.48%)

61.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.79
/pkg/authserver/runner/embeddedauthserver.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc