Skip to content

Raise exception when session store cannot connect to Redis#7583

Merged
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/fail-loudly-on-session-redis-down
Jan 5, 2023
Merged

Raise exception when session store cannot connect to Redis#7583
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/fail-loudly-on-session-redis-down

Conversation

@mitchellhenke
Copy link
Contributor

🛠 Summary of changes

Kind of a sibling PR to #7547. This adds a handler to the Redis session store configuration to re-raise Redis connection errors. This change is intended to ensure that it is apparent to us and end users when a critical piece of the system is down.

Mitchell Henke added 2 commits January 5, 2023 12:26
changelog: Internal, Session Handling, Raise exception when session cannot connect to Redis
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

RSpec.describe 'redis down session error handling' do
context 'with bad Redis connection' do
it 'fails loudly' do
allow(REDIS_SESSION_POOL_WRAPPER).to receive(:setex).and_raise(Redis::CannotConnectError)
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/fail-loudly-on-session-redis-down branch from 551ab3c to bb8d8ab Compare January 5, 2023 21:17
@mitchellhenke mitchellhenke merged commit fcba0fe into main Jan 5, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/fail-loudly-on-session-redis-down branch January 5, 2023 21:53
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