Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax Redis requirement #739

Merged
merged 3 commits into from
Nov 1, 2023
Merged

Relax Redis requirement #739

merged 3 commits into from
Nov 1, 2023

Commits on Oct 25, 2023

  1. docs: Note that Redis must have TLS enabled

    Connecting with the rediss: protocol won't work if TLS isn't enabled,
    and the error message is a generic "connection timed out".
    tsibley committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    ac62b5b View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. authn: Store user "stale before" markers durably in SQLite when Redis…

    … is not available
    
    Rather than non-durably in process memory.  This solves two issues:
    
     1. It allows for production use without Redis as long as certain other
        requirements are met.  I'll be documenting these and relaxing the
        Redis requirement in a subsequent commit.  This is motivated by
        CDC's deployment.¹
    
     2. It makes development more like production, which is important as the
        difference wasn't obvious and led to strange behaviour, e.g. across
        server restarts.²
    
    I knew the transient in-memory store was not ideal when I wrote it, but
    it was very expedient! and I didn't want to address it further at the
    time.  This now rectifies that.
    
    The configuration of the keyv library with a key namespace ensures that
    no key name migration is needed with this change.
    
    ¹ <nextstrain/private#94>
    ² <#581 (comment)>
    tsibley committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    dc0ab05 View commit details
    Browse the repository at this point in the history
  2. Allow and document how to run safely in production mode without Redis

    This is made possible by the previous commit which switched the
    non-Redis fallback from an in-memory store to an on-disk SQLite store.
    
    As a nice side-effect, we can now set REDIS_REQUIRED=true in development
    mode (i.e. not the default) to more easily test the production mode code
    path.
    
    Related-to: <nextstrain/private#94>
    tsibley committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    64f7d92 View commit details
    Browse the repository at this point in the history