Skip to content

Better error handling for cache connections - #995

Merged
javuto merged 1 commit into
developfrom
bug-redis-bad-config
Aug 25, 2026
Merged

Better error handling for cache connections#995
javuto merged 1 commit into
developfrom
bug-redis-bad-config

Conversation

@javuto

@javuto javuto commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added explicit mapstructure tags for Redis YAML config fields so Viper decoding is pinned to the documented YAML keys.
  • Switched API/TLS YAML config loading to use isolated Viper instances instead of the package-global Viper state.
  • Improved Redis connection errors for the common mismatch where osctrl sends a password but Redis has no password configured.
  • Added regression coverage for Redis YAML loading in both osctrl-api and osctrl-tls.
  • Added unit coverage for the Redis auth-mismatch error wrapper.

Notes

The original Redis error indicates the service is sending an AUTH password, but the Redis server is not configured with one. Operators should either clear redis.password / credentials in redis.connectionString, or configure Redis with the matching password.

Validation

  • git diff --check

Could not run gofmt or go test in this sandbox because the host Go toolchain was blocked with operation not permitted.

@javuto javuto added osctrl-tls osctrl-tls related changes osctrl-api osctrl-api related changes test Adding or changing tests cache Cache related issues labels Aug 25, 2026
@javuto
javuto merged commit a1bde88 into develop Aug 25, 2026
7 checks passed
@javuto
javuto deleted the bug-redis-bad-config branch August 25, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cache Cache related issues osctrl-api osctrl-api related changes osctrl-tls osctrl-tls related changes test Adding or changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant