Skip to content

Fix OIDC token instrospection redis_instance args#1451

Merged
davinotdavid merged 1 commit intomainfrom
fix-broken-redis-call
Jan 21, 2026
Merged

Fix OIDC token instrospection redis_instance args#1451
davinotdavid merged 1 commit intomainfrom
fix-broken-redis-call

Conversation

@davinotdavid
Copy link
Contributor

Description of the Change

  • When we call get_subscriber directly, we are not going through the FastAPI DI so the redis_instance is actually a Depends object. Added the redis_instance to the calls to get_subscriber so that it actually works now.
  • Also, since there might be other occasions in the future where we might make the call directly, I've added a conditional to make the redis_instance = None instead so we fail gracefully and just don't use the caching at all for the token introspection (and added tests).

Benefits

  • Less noisy Sentry logs and gracefully handling cases where we mistakenly call the get_subscriber without passing a redis_instance from the FastAPI DI.

Applicable Issues

Fixes #1448

Copy link
Member

@MelissaAutumn MelissaAutumn left a comment

Choose a reason for hiding this comment

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

Looks good, I'd rather we resolve the dependency for redis_instance if it isn't already, but we can cut a future ticket for that.

Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

lgtm, thanks Davi!

@davinotdavid davinotdavid merged commit 8bfb171 into main Jan 21, 2026
8 checks passed
@davinotdavid davinotdavid deleted the fix-broken-redis-call branch January 21, 2026 14: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.

AttributeError with redis call

3 participants