Skip to content

chore: simplify, modernize (Go 1.26), update deps#213

Merged
rustatian merged 2 commits into
masterfrom
chore/cleanup-modernize-deps
Jun 3, 2026
Merged

chore: simplify, modernize (Go 1.26), update deps#213
rustatian merged 2 commits into
masterfrom
chore/cleanup-modernize-deps

Conversation

@rustatian
Copy link
Copy Markdown
Member

@rustatian rustatian commented May 29, 2026

Bug fixes

  • kv/driver.go:74MinRetryBackoff was set to MaxRetryBackoff (copy-paste); min always equalled max
  • kv/tlsconfig.go:41AppendCertsFromPEM failure returned nil, nil (silent empty pool); now returns a real error
  • kv/tlsconfig.go:48os.Stat(conf.RootCa) ran unconditionally outside the RootCa != "" guard; cert/key-only TLS always failed; moved inside the block
  • kv/driver.go:286Expire result discarded in MExpire; errors silently lost
  • kv/driver.gokeys == nil guards replaced with len(keys) == 0 (Has, MGet, Set, Delete, TTL)
  • kv/driver.go:334Clear called FlushDB().Err() twice; simplified to a single call

Simplify / modernise

  • kv/tlsconfig.go — removed dead TLS 1.3 CipherSuites block (Go ignores CipherSuites for 1.3 since Go 1.17); dropped golang.org/x/sys/cpu direct dependency
  • config.go — removed dead root-package Config/InitDefaults (actual config lives in kv.Config and is never read from the root package)

Deps

  • go mod tidy; golang.org/x/sys demoted to indirect (no longer directly imported)

Bugs fixed:
- kv/driver.go: MinRetryBackoff was set to MaxRetryBackoff (copy-paste) — min always equalled max
- kv/tlsconfig.go: AppendCertsFromPEM failure returned nil,nil (silent empty pool) — now returns a real error
- kv/tlsconfig.go: os.Stat(conf.RootCa) ran unconditionally outside the RootCa block — cert/key-only TLS always failed; moved inside the guard
- kv/driver.go: Expire result discarded in MExpire — errors silently lost
- kv/driver.go: len(keys)==0 guards replacing keys==nil (Has, MGet, Set, Delete, TTL)
- kv/driver.go: Clear checked FlushDB().Err() twice — simplified to single call

Simplify / modernise:
- kv/tlsconfig.go: removed dead TLS 1.3 CipherSuites block (Go ignores CipherSuites for 1.3); dropped golang.org/x/sys/cpu import
- config.go: removed dead root-package Config/InitDefaults (actual config lives in kv.Config)

Deps: go mod tidy; golang.org/x/sys demoted to indirect
Copilot AI review requested due to automatic review settings May 29, 2026 12:46
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Warning

Review limit reached

@rustatian, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 30 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 223ea777-bf8d-4ab3-aa53-cebfc8179152

📥 Commits

Reviewing files that changed from the base of the PR and between 4125fa2 and 9df7b82.

⛔ Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • go.work.sum is excluded by !**/*.sum
  • tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • config.go
  • go.mod
  • kv/driver.go
  • kv/tlsconfig.go
  • tests/go.mod
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/cleanup-modernize-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Redis KV plugin by fixing several Redis driver/TLS bugs, simplifying dead TLS cipher-suite logic, and tidying module checksums/dependency classification.

Changes:

  • Fixes Redis driver behavior for retry backoff, empty variadic inputs, MExpire error propagation, and Clear error handling.
  • Simplifies TLS configuration and returns a real error when CA PEM parsing fails.
  • Removes root-package config code and updates Go module sums/dependency metadata.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
kv/driver.go Fixes Redis option wiring and error handling in KV operations.
kv/tlsconfig.go Simplifies TLS defaults and improves root CA parse error handling.
config.go Deletes the root-package exported config type/defaults.
go.mod Moves golang.org/x/sys to indirect dependencies.
go.sum Adds tidy-generated checksum entry.
tests/go.sum Adds tidy-generated checksum entry for tests module.
go.work.sum Updates workspace checksum metadata.
Comments suppressed due to low confidence (1)

config.go:1

  • Removing the exported root-package Config type is a breaking API change for consumers that import github.com/roadrunner-server/redis/v6 and reference redis.Config, even if this package no longer uses it internally. Keep the compatibility type (or defer removal to a major-version change) so external users do not get compile-time failures from this cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.48%. Comparing base (4125fa2) to head (9df7b82).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   73.33%   81.48%   +8.14%     
==========================================
  Files           2        1       -1     
  Lines          30       27       -3     
==========================================
  Hits           22       22              
+ Misses          6        3       -3     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rustatian rustatian self-assigned this Jun 3, 2026
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian merged commit 1190e50 into master Jun 3, 2026
1 of 2 checks passed
@rustatian rustatian deleted the chore/cleanup-modernize-deps branch June 3, 2026 19:42
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.

2 participants