FAQ | This is a LIVE service | Changelog

Skip to content
  1. Jan 21, 2020
  2. Jan 08, 2019
  3. Oct 24, 2018
  4. May 22, 2018
  5. Apr 27, 2018
  6. Apr 26, 2018
    • Dr Abraham Martin's avatar
      Merge pull request #23 from rjw57/user-creation-race · dc513fa4
      Dr Abraham Martin authored
      authentication: remove race condition in creating users
      dc513fa4
    • Dr Rich Wareham's avatar
      authentication: remove race condition in creating users · 166819f3
      Dr Rich Wareham authored
      Previously we emulated a get_or_create user behaviour by attempting to
      get the user and, if that failed, create it.
      
      This introduced a race where another worker could create a user between
      these checks. (We observed this in production when an initial log in
      causes a flurry of requests to lookupproxy.) This was a result of
      Django's autocommit mode since the user fetch and subsequent user
      creation were separate transactions allowing for database change between
      them.
      
      The race-free approach is to *always* attempt to create the user and
      only if that fails do we fetch the user. These are still run as separate
      transactions but the user object will always be created by the first
      worker to talk to the DB and the rest will see an integrity error
      causing them to fetch the new user object.
      166819f3
  7. Apr 25, 2018
  8. Mar 26, 2018
  9. Mar 22, 2018
    • Dr Rich Wareham's avatar
      add retries to OAuth2 HTTP(S) requests · f2b4b6db
      Dr Rich Wareham authored
      Add a configurable number of retry attempts when fetching tokens from
      the OAuth2 endpoint or when requesting resources authorised with OAuth2
      tokens.
      
      This uses requests' built-in retry behaviour which retries only in the
      face of network errors such as DNS failures or connection errors. It
      does not retry if data has made it to the server.
      
      It is, unfortunately, non-trivial to write a test for this since faking
      a network error requires deeper knowledge of requests internals than I
      possess. We rely on the max_retries parameter behaving as documented.
      f2b4b6db
  10. Mar 20, 2018
  11. Mar 08, 2018
  12. Feb 22, 2018
  13. Feb 15, 2018
  14. Feb 13, 2018
  15. Feb 12, 2018
  16. Feb 08, 2018
Loading