Redis-backed async tape store plugin for bub.
- Bub plugin entry point:
tapestore-redis - A
provide_tape_storehook implementation backed by Redis - Exported
RedisTapeStoreclass for direct use - Query behavior aligned with Bub tape queries
uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-tapestore-redis"You can also install it with Bub:
bub install bub-tapestore-redis@mainThe plugin reads environment variables with prefix BUB_TAPESTORE_REDIS_:
BUB_TAPESTORE_REDIS_URL(optional)- Default:
redis://localhost:6379/0 - Include authentication in the URL when Redis requires it:
- Password only:
redis://:password@localhost:6379/0 - ACL username and password:
redis://username:password@localhost:6379/0 - TLS:
rediss://username:password@host:6379/0
- Password only:
- Default:
BUB_TAPESTORE_REDIS_KEY_PREFIX(optional)- Default:
republic:tape - The legacy default is retained to preserve existing Redis data.
- Default:
If the password contains reserved URL characters such as @, :, or /, it
must be URL-encoded before putting it in BUB_TAPESTORE_REDIS_URL.
- The plugin overrides Bub's builtin file-based tape store through
provide_tape_store. - The store keeps per-tape entry IDs monotonic with Redis-side atomic allocation.
- Anchor queries use a Redis sorted set so
after_anchor,last_anchor, andbetween_anchorsstay consistent with Bub expectations. - The package exposes an async
RedisTapeStorefor non-plugin usage.
- Callers own the Redis client lifecycle when using the store classes directly.
- Keys with the same prefix land in the same Redis slot, which avoids
CROSSSLOTerrors for Redis multi-key operations. - Tape names are losslessly encoded inside the key namespace, so names containing
{or}do not collide.