Skip to content

Pin redis client to RESP2 for compatibility with deployed Redis v4#6025

Merged
rtibbles merged 1 commit into
learningequality:unstablefrom
rtibbles:redis-resp2-compat
Jul 1, 2026
Merged

Pin redis client to RESP2 for compatibility with deployed Redis v4#6025
rtibbles merged 1 commit into
learningequality:unstablefrom
rtibbles:redis-resp2-compat

Conversation

@rtibbles

@rtibbles rtibbles commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Pin the redis protocol to RESP2 rather than the redis-py 8 default of RESP3, for backwards compatibility with the older deployed Redis server (v4). RESP3's HELLO handshake is rejected by Redis < 6, breaking every connection.

References

Reviewer guidance

  • contentcuration/contentcuration/settings.py overrides DEFAULT_RESP_VERSION globally — the one lever that reaches all three connection paths (django-redis cache, native RedisCache, kombu/Celery broker).
  • Confirm none of those paths rely on RESP3-only behaviour.
  • Revert once the deployed Redis server is upgraded to ≥ 6.

AI usage

Used Claude Code to trace the breakage to redis-py 8 switching its default to RESP3 and to implement the global RESP2 override.

redis-py 8 defaults connections to RESP3, whose HELLO handshake the
deployed Redis v4 server rejects. Override the client-wide default back
to RESP2 to cover all connection paths (cache, native RedisCache, kombu).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYYEYww8xJuFsjkLRbHqsn
@rtibbles rtibbles marked this pull request as ready for review July 1, 2026 05:38
@rtibbles rtibbles merged commit f89579e into learningequality:unstable Jul 1, 2026
20 checks passed
@rtibbles rtibbles deleted the redis-resp2-compat branch July 1, 2026 05:38
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