Skip to content

Commit

Permalink
Add further instructions for A/B testing. (hedyorg#533)
Browse files Browse the repository at this point in the history
Co-authored-by: Felienne <[email protected]>
  • Loading branch information
fpereiro and Felienne authored Jun 24, 2021
1 parent 0b68dc3 commit a4594ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,7 @@ test environment and then gives the result back to the client.
The main environment passes the `session_id` to the test environment so that the test environment can use that session_id for logging. The session variables set by the test environment are read by the main environment by parsing the cookie header returned by the test environment. Other session variables set by the main environment will be available to the test environment since they will be also present in the session cookie sent by the main environment to the test environment.

All the auth routes are *never* reverse proxied, to keep all the cookie setting within the scope of the main environment. The test environment, however, needs access to the same tables as the main environment to make sure that the cookies forwarded by the main environment are indeed valid. In other words, the test environment must be able to read and validate cookies. To do this, the test environment should have the same value for the environment variable `AWS_DYNAMODB_TABLE_PREFIX` as that of the main environment.

Whenever enabling a test, please make sure of the following:
1. All the code deployed in the production environment is also merged and deployed to the test environment.
2. The `AWS_DYNAMODB_TABLE_PREFIX` configuration variable is the same for both the production and the test environment.

0 comments on commit a4594ab

Please sign in to comment.