Skip to content

Add Deno Redis integration - #6686

Merged
tim-smart merged 5 commits into
mainfrom
agent/codex-engineer/71b23293
Jul 28, 2026
Merged

Add Deno Redis integration#6686
tim-smart merged 5 commits into
mainfrom
agent/codex-engineer/71b23293

Conversation

@tim-smart

@tim-smart tim-smart commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a scoped Deno Redis integration backed by @db/redis
  • support URL-based and explicit connection options
  • mirror Redis persistence and queue integration coverage under Deno

Testing

  • pnpm lint-fix
  • pnpm check
  • pnpm --filter @effect/platform-deno check
  • deno task test --run packages/platform-deno/test/DenoRedis.test.ts

Closes EFF-151

Summary by CodeRabbit

  • New Features
    • Added native Redis integration for Deno applications via new DenoRedis support.
    • Configure Redis using a URL or explicit connection details (explicit credentials override URL) via layer and layerConfig.
    • Enables Redis-backed cache and queue persistence with improved error handling.
  • Bug Fixes
    • Improved queue failure handling by moving exhausted items to the failed queue.
  • Tests
    • Added Deno Redis integration coverage for cache/queue persistence, connection lifecycle, and correct AUTH credential behavior.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f61108a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
@effect/platform-deno Patch
effect Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e82c97d2-3326-4c31-a631-b2767a5cbaf6

📥 Commits

Reviewing files that changed from the base of the PR and between f61108a and e42bb08.

📒 Files selected for processing (1)
  • packages/platform-deno/src/DenoRedis.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/platform-deno/src/DenoRedis.ts

📝 Walkthrough

Walkthrough

Adds a native Deno Redis integration backed by @db/redis, exposes it through @effect/platform-deno, and tests persistence behavior, connection cleanup, URL credentials, and credential precedence.

Changes

Deno Redis integration

Layer / File(s) Summary
Redis layer and service implementation
packages/platform-deno/src/DenoRedis.ts
Defines Redis options and the DenoRedis service, manages scoped client acquisition and cleanup, maps failures to RedisError, and adapts commands for persistence Redis.
Package export and release wiring
packages/platform-deno/package.json, packages/platform-deno/src/index.ts, .changeset/eff-151-deno-redis.md
Adds Redis runtime and test-container packages, exports the DenoRedis namespace, and records a patch release.
Persistence and connection validation
packages/platform-deno/test/DenoRedis.test.ts
Runs persisted cache and queue suites and verifies failed-item handling, interrupted acquisition cleanup, URL-based authentication, and explicit credential overrides.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Application
  participant DenoRedisLayer
  participant RedisClient
  participant PersistenceSuite
  Application->>DenoRedisLayer: Configure host, port, or URL
  DenoRedisLayer->>RedisClient: Acquire scoped client
  PersistenceSuite->>RedisClient: Execute persistence commands
  RedisClient-->>PersistenceSuite: Return command results
  DenoRedisLayer->>RedisClient: Close client on scope end
Loading
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@effect-slopcop effect-slopcop Bot added 4.0 enhancement New feature or request labels Jul 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/platform-deno/src/DenoRedis.ts`:
- Around line 54-64: Update the Effect.tryPromise callback around connect so it
accepts the provided AbortSignal and passes it into connect for both the
localhost and parsed-URL branches. Merge it with any caller-provided signal in
connectOptions, preserving existing connection options while ensuring
interruption cancels the handshake.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a3fdd2e-4785-4a49-8723-5e4d5afc9a77

📥 Commits

Reviewing files that changed from the base of the PR and between 45e7810 and e500693.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .changeset/eff-151-deno-redis.md
  • packages/platform-deno/package.json
  • packages/platform-deno/src/DenoRedis.ts
  • packages/platform-deno/src/index.ts
  • packages/platform-deno/test/DenoRedis.test.ts

Comment thread packages/platform-deno/src/DenoRedis.ts Outdated
@tim-smart
tim-smart force-pushed the agent/codex-engineer/71b23293 branch from e500693 to 9331205 Compare July 28, 2026 06:11
@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

File Name Current Size Previous Size Difference
basic.ts 6.63 KB 6.63 KB 0.00 KB (0.00%)
batching.ts 9.37 KB 9.37 KB 0.00 KB (0.00%)
brand.ts 6.26 KB 6.26 KB 0.00 KB (0.00%)
cache.ts 10.12 KB 10.12 KB 0.00 KB (0.00%)
config.ts 19.22 KB 19.22 KB 0.00 KB (0.00%)
differ.ts 18.42 KB 18.42 KB 0.00 KB (0.00%)
http-client.ts 20.88 KB 20.88 KB 0.00 KB (0.00%)
logger.ts 10.28 KB 10.28 KB 0.00 KB (0.00%)
metric.ts 8.55 KB 8.55 KB 0.00 KB (0.00%)
optic.ts 7.41 KB 7.41 KB 0.00 KB (0.00%)
pubsub.ts 14.20 KB 14.20 KB 0.00 KB (0.00%)
queue.ts 11.09 KB 11.09 KB 0.00 KB (0.00%)
schedule.ts 10.27 KB 10.27 KB 0.00 KB (0.00%)
schema-class.ts 18.16 KB 18.16 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 28.02 KB 28.02 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 24.34 KB 24.34 KB 0.00 KB (0.00%)
schema-string-transformation.ts 12.69 KB 12.69 KB 0.00 KB (0.00%)
schema-string.ts 10.35 KB 10.35 KB 0.00 KB (0.00%)
schema-template-literal.ts 14.49 KB 14.49 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 20.93 KB 20.93 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 23.38 KB 23.38 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 18.32 KB 18.32 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 18.00 KB 18.00 KB 0.00 KB (0.00%)
schema-toFormatter.ts 17.88 KB 17.88 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 21.52 KB 21.52 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 18.56 KB 18.56 KB 0.00 KB (0.00%)
schema.ts 17.43 KB 17.43 KB 0.00 KB (0.00%)
stm.ts 12.05 KB 12.05 KB 0.00 KB (0.00%)
stream.ts 9.37 KB 9.37 KB 0.00 KB (0.00%)

Comment thread packages/platform-deno/src/DenoRedis.ts Outdated
@tim-smart
tim-smart enabled auto-merge (squash) July 28, 2026 09:20
@tim-smart
tim-smart merged commit a149f89 into main Jul 28, 2026
15 checks passed
@tim-smart
tim-smart deleted the agent/codex-engineer/71b23293 branch July 28, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant