Skip to content

v0.3.24: revert redis session management change#948

Merged
icecrasher321 merged 1 commit intomainfrom
staging
Aug 12, 2025
Merged

v0.3.24: revert redis session management change#948
icecrasher321 merged 1 commit intomainfrom
staging

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Reverting redis session management changes here #934 since Sockets auth is failing for unknown reason.

Type of Change

  • Bug fix

Testing

Tested using ngrok + staging.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
sim (staging) Ready Preview Comment Aug 12, 2025 10:55pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs ⬜️ Skipped Aug 12, 2025 10:55pm

@icecrasher321 icecrasher321 merged commit 8fccd5c into main Aug 12, 2025
7 checks passed
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR reverts Redis-based session management functionality that was introduced in PR #934 due to Socket.IO authentication failures. The changes remove the Redis secondary storage implementation from the authentication system and restore the original fixed session configuration values.

In apps/sim/lib/auth.ts, the PR removes the conditional secondaryStorage configuration that used Redis for session data storage with get/set/delete operations. The session configuration is reverted to use fixed timing values: 24-hour cookie cache, 30-day expiration, 24-hour update age, and 1-hour fresh age. This replaces the dynamic session timing that was previously adjusted based on Redis availability.

In apps/sim/lib/env.ts, the comment for the REDIS_URL environment variable is updated to remove the "(optional - improves performance)" description, indicating that Redis is now used only for general caching rather than as an optional session management optimization.

The Redis session management was originally implemented to improve performance by reducing database polling for session data and providing faster session lookups. However, this optimization created compatibility issues with the Socket.IO authentication flow, causing real-time connection failures. Since Socket.IO functionality appears to be core to the application's real-time features, the team prioritized fixing the authentication issue over maintaining the performance enhancement. The revert restores the proven stable session management approach using the default better-auth storage mechanism (likely database-based) while allowing time to investigate and resolve the Redis-Socket.IO integration issues separately.

Confidence score: 5/5

  • This PR is extremely safe to merge with minimal risk as it reverts problematic functionality back to a known stable state
  • Score reflects that this is a straightforward revert of recent changes that were causing authentication failures, restoring proven working code
  • No files require special attention as both changes are simple reverts with clear intent

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
v0.3.24: revert redis session management change
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