Skip to content

Extract rollout-redis as a separate adapter gem - #181

Open
michal-granec wants to merge 5 commits into
v3-feature-statefrom
v3-redis-backend
Open

Extract rollout-redis as a separate adapter gem#181
michal-granec wants to merge 5 commits into
v3-feature-statefrom
v3-redis-backend

Conversation

@michal-granec

Copy link
Copy Markdown
Contributor

Stacked on #180.

Summary

  • Extract Redis persistence and history into rollout-redis (Rollout::Redis::Backend + Rollout::Redis::Codec).
  • Core Rollout now takes backend: and no longer depends on redis.
  • Split tests: core specs run without Redis; adapter specs live in rollout-redis/spec.

This is the second Rollout 3 slice. It does not add Active Record, change hashing, or raise the Ruby requirement.

Test plan

  • Core CI job green without a Redis service
  • Redis adapter CI job green on the existing Ruby 2.4–3.3 matrix
  • Existing Redis payloads still load without rewriting unread keys
  • Rollout.new(backend: Rollout::Redis::Backend.new(redis)) activates, deactivates, and evaluates as before
  • History still truncates per history_length; delete removes feature history; clear! keeps it

Checks: core 20 examples passed, Redis adapter 103 examples passed, rebased onto v3-feature-state.

Move Redis persistence and history into Rollout::Redis::Backend.
Core Rollout takes a backend and no longer depends on redis.
setup-ruby should install rollout-redis/Gemfile from that directory so
BUNDLE_GEMFILE is unnecessary and bundle exec rspec finds the gems.
Bump core to 3.0.0, require a compatible core range in the adapter, and
keep logging/observer snapshot eligibility consistent through a mutation.
Read only the requested history entries, decode Redis events in the
adapter, and give the backend a clear_features hook so clear! can remove
the empty registry without changing logging-disabled delete behavior.
The shared examples live in the repository spec/support directory, two
levels above the adapter specs.
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