Skip to content
Permalink

Comparing changes

Choose two branches to see whatโ€™s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reflex-dev/reflex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.18
Choose a base ref
...
head repository: reflex-dev/reflex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.19
Choose a head ref
  • 16 commits
  • 30 files changed
  • 2 contributors

Commits on Nov 4, 2025

  1. ENG-8212: Redis Oplock implementation (#5932)

    * Token manager tracks instance_id in token_to_socket
    
    * RedisTokenManager: keep local dicts globally updated via pub/sub
    
    * Implement lost+found for StateUpdate without websocket
    
    When an update is emitted for a token, but the websocket for that token is on
    another instance of the app, post it to the lost+found channel where other
    instances are listening for updates to send to their clients.
    
    * Implement `enumerate_tokens` for TokenManager
    
    Set the groundwork for being able to broadcast updates to all connected states.
    
    * Consolidate on `_get_token_owner`
    
    * fix test_connection_banner.py: expect SocketRecord JSON
    
    * Use a single lock waiter
    
    For more efficient and fair lock queueing, each StateManagerRedis uses a single
    task to monitor the keyspace for lock release/expire and then wakes up the next
    caller that was waiting in the queue (no fairness between separate processes
    though).
    
    Now lockers will wait for an `asyncio.Event` which is set by the redis pubsub
    waiter. If any locker waits longer than the lock_expiration, it will just try
    to get the lock in case there was some mixup with the pub/sub, the locker won't
    be blocked forever.
    
    * Redis Oplock implementation
    
    * When taking a lock from redis, hold it for 80% of the lock expiration timeout
    * While the lock is held, other events processed against the instance will use
      the cached in-memory copy of the state.
    * When the timeout expires or another process signals intention to access a
      locked state, flush the modifed states to redis and release the lock.
    
    Set REFLEX_OPLOCK_ENABLED=1 to use this feature
    
    * add test_background_task.py::test_fast_yielding
    
    * Implement real redis-backed test cases for lost+found
    
    * add some polling for the emit mocks since L+F doesn't happen immediately
    
    * Fix up unit tests for OPLOCK_ENABLED mode
    
    * support py3.10
    
    * Do not track contended leases in-process
    
    Always check redis for contended leases before granting a lease. It's a bit
    slower, but much more reliable and avoids racy lock_expiration timeouts when
    contention occurs before the lease is created or when the pubsub hasn't caught
    up to reality.
    
    Always start _lock_update_task in __post_init__ to avoid race where the lease
    is granted, then contended, but the pubsub task hasn't started to catch the
    contention.
    
    * Add real+mock test cases for StateManagerRedis
    
    * update test_state to use mock_redis when real redis is not available
    
    * safe await cancelled task
    
    * explicitly disable oplock for basic test_redis cases
    
    * py3.10 support: asyncio.TimeoutError != TimeoutError
    
    * break out of forever tasks when event loop goes away
    
    No point in continually spamming "no running event loop" to the console.
    
    * generalize "forever" tasks to centralize exception handling/retry
    
    * remove unused arg
    
    * less racy way test_ensure_task_limit_window_passed
    
    * rename REFLEX_STATE_MANAGER_REDIS_DEBUG to match the class name
    masenf authored Nov 4, 2025
    Configuration menu
    Copy the full SHA
    781bd06 View commit details
    Browse the repository at this point in the history
  2. 0819dev (#5944)

    adhami3310 authored Nov 4, 2025
    Configuration menu
    Copy the full SHA
    fa028b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6663dfd View commit details
    Browse the repository at this point in the history
  4. prerelease

    adhami3310 committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    0218134 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2025

  1. ENG-8227: always _clean() after app.modify_state (#5949)

    app.modify_state might not always generate a delta, but it _does_ always need
    to be cleaned so that dirty backend vars and dirty substates (with backend
    vars) are not persisted to redis (and subsequently reloaded when the referenced
    states may not be cached)
    masenf authored Nov 5, 2025
    Configuration menu
    Copy the full SHA
    982d2fa View commit details
    Browse the repository at this point in the history
  2. cache path cwd (#5948)

    * cache path cwd
    
    * use get cwd for maximum perf
    adhami3310 authored Nov 5, 2025
    Configuration menu
    Copy the full SHA
    e5d3552 View commit details
    Browse the repository at this point in the history
  3. check against classvar for fast case (#5947)

    * check against classvar for fast case
    
    * also have one for setattr
    adhami3310 authored Nov 5, 2025
    Configuration menu
    Copy the full SHA
    4d1c86d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    579e922 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2025

  1. Configuration menu
    Copy the full SHA
    608f71e View commit details
    Browse the repository at this point in the history
  2. add polling transport option (#5955)

    * add polling transport option
    
    * fix CORS
    
    * set number of workers to 1
    
    * add enterprise guard
    
    * add once why not
    adhami3310 authored Nov 6, 2025
    Configuration menu
    Copy the full SHA
    fd6e111 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80108bf View commit details
    Browse the repository at this point in the history
  4. prerelease

    adhami3310 committed Nov 6, 2025
    Configuration menu
    Copy the full SHA
    03af56b View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2025

  1. ENG-8049: pass correct parameters to queueEvents (#5962)

    There was also another place in the call_script callback path where the
    incorrect parameters have been passed since at least 0.8 ๐Ÿ™€
    masenf authored Nov 10, 2025
    Configuration menu
    Copy the full SHA
    3c3ddc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91a6bdc View commit details
    Browse the repository at this point in the history
  3. prerelease

    adhami3310 committed Nov 10, 2025
    Configuration menu
    Copy the full SHA
    4e8aebd View commit details
    Browse the repository at this point in the history
  4. release

    adhami3310 committed Nov 10, 2025
    Configuration menu
    Copy the full SHA
    9ac42f5 View commit details
    Browse the repository at this point in the history
Loading