From 3cfcbdb81a7c9efcfb387fa7473c9111094dacd7 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Thu, 21 Apr 2022 18:43:00 -0400 Subject: [PATCH 1/9] feat: don't run Tokenserver migrations on startup --- Makefile | 5 ++++- src/tokenserver/README.md | 2 +- src/tokenserver/db/pool.rs | 22 ---------------------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index a44b266428..43683d1aeb 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,13 @@ python: venv/bin/python -m pip install -r requirements.txt run: python - PATH=./venv/bin:$(PATH) RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml + PATH="./venv/bin:$(PATH)" RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml run_spanner: GOOGLE_APPLICATION_CREDENTIALS=$(PATH_TO_SYNC_SPANNER_KEYS) GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=$(PATH_TO_GRPC_CERT) make run test: SYNC_DATABASE_URL=$(SYNC_DATABASE_URL) SYNC_TOKENSERVER__DATABASE_URL=$(SYNC_TOKENSERVER__DATABASE_URL) RUST_TEST_THREADS=1 cargo test + +tokenserver_migrate: + diesel --database-url $(SYNC_TOKENSERVER__DATABASE_URL) migration --migration-dir src/tokenserver/migrations run diff --git a/src/tokenserver/README.md b/src/tokenserver/README.md index 7d55267233..e025a4417b 100644 --- a/src/tokenserver/README.md +++ b/src/tokenserver/README.md @@ -45,7 +45,7 @@ cargo install diesel_cli ``` Then, run the migrations: ``` -diesel --database-url mysql://sample_user:sample_password@localhost/tokenserver_rs migration --migration-dir src/tokenserver/migrations run +make tokenserver_migrate ``` You should replace the above database Data Source Name (DSN) with the DSN of the database you are using. diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index 50ca2aa76d..4b5b73a44e 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -3,10 +3,7 @@ use async_trait::async_trait; use diesel::{ mysql::MysqlConnection, r2d2::{ConnectionManager, Pool}, - Connection, }; -#[cfg(test)] -use diesel_logger::LoggingConnection; use std::time::Duration; use super::models::{Db, DbResult, TokenserverDb}; @@ -17,23 +14,6 @@ use crate::tokenserver::settings::Settings; #[cfg(test)] use crate::db::mysql::TestTransactionCustomizer; -embed_migrations!("src/tokenserver/migrations"); - -/// Run the diesel embedded migrations -/// -/// Mysql DDL statements implicitly commit which could disrupt MysqlPool's -/// begin_test_transaction during tests. So this runs on its own separate conn. -pub fn run_embedded_migrations(database_url: &str) -> DbResult<()> { - let conn = MysqlConnection::establish(database_url)?; - - #[cfg(test)] - embedded_migrations::run(&LoggingConnection::new(conn))?; - #[cfg(not(test))] - embedded_migrations::run(&conn)?; - - Ok(()) -} - #[derive(Clone)] pub struct TokenserverPool { /// Pool of db connections @@ -47,8 +27,6 @@ impl TokenserverPool { metrics: &Metrics, _use_test_transactions: bool, ) -> DbResult { - run_embedded_migrations(&settings.database_url)?; - let manager = ConnectionManager::::new(settings.database_url.clone()); let builder = Pool::builder() .max_size(settings.database_pool_max_size.unwrap_or(10)) From f0ca465caed553c81a1c0f3fd2adf96cfe02d96f Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Thu, 21 Apr 2022 18:51:35 -0400 Subject: [PATCH 2/9] Revert "feat: don't run Tokenserver migrations on startup" This reverts commit 3cfcbdb81a7c9efcfb387fa7473c9111094dacd7. --- Makefile | 5 +---- src/tokenserver/README.md | 2 +- src/tokenserver/db/pool.rs | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 43683d1aeb..a44b266428 100644 --- a/Makefile +++ b/Makefile @@ -44,13 +44,10 @@ python: venv/bin/python -m pip install -r requirements.txt run: python - PATH="./venv/bin:$(PATH)" RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml + PATH=./venv/bin:$(PATH) RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml run_spanner: GOOGLE_APPLICATION_CREDENTIALS=$(PATH_TO_SYNC_SPANNER_KEYS) GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=$(PATH_TO_GRPC_CERT) make run test: SYNC_DATABASE_URL=$(SYNC_DATABASE_URL) SYNC_TOKENSERVER__DATABASE_URL=$(SYNC_TOKENSERVER__DATABASE_URL) RUST_TEST_THREADS=1 cargo test - -tokenserver_migrate: - diesel --database-url $(SYNC_TOKENSERVER__DATABASE_URL) migration --migration-dir src/tokenserver/migrations run diff --git a/src/tokenserver/README.md b/src/tokenserver/README.md index e025a4417b..7d55267233 100644 --- a/src/tokenserver/README.md +++ b/src/tokenserver/README.md @@ -45,7 +45,7 @@ cargo install diesel_cli ``` Then, run the migrations: ``` -make tokenserver_migrate +diesel --database-url mysql://sample_user:sample_password@localhost/tokenserver_rs migration --migration-dir src/tokenserver/migrations run ``` You should replace the above database Data Source Name (DSN) with the DSN of the database you are using. diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index 4b5b73a44e..50ca2aa76d 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -3,7 +3,10 @@ use async_trait::async_trait; use diesel::{ mysql::MysqlConnection, r2d2::{ConnectionManager, Pool}, + Connection, }; +#[cfg(test)] +use diesel_logger::LoggingConnection; use std::time::Duration; use super::models::{Db, DbResult, TokenserverDb}; @@ -14,6 +17,23 @@ use crate::tokenserver::settings::Settings; #[cfg(test)] use crate::db::mysql::TestTransactionCustomizer; +embed_migrations!("src/tokenserver/migrations"); + +/// Run the diesel embedded migrations +/// +/// Mysql DDL statements implicitly commit which could disrupt MysqlPool's +/// begin_test_transaction during tests. So this runs on its own separate conn. +pub fn run_embedded_migrations(database_url: &str) -> DbResult<()> { + let conn = MysqlConnection::establish(database_url)?; + + #[cfg(test)] + embedded_migrations::run(&LoggingConnection::new(conn))?; + #[cfg(not(test))] + embedded_migrations::run(&conn)?; + + Ok(()) +} + #[derive(Clone)] pub struct TokenserverPool { /// Pool of db connections @@ -27,6 +47,8 @@ impl TokenserverPool { metrics: &Metrics, _use_test_transactions: bool, ) -> DbResult { + run_embedded_migrations(&settings.database_url)?; + let manager = ConnectionManager::::new(settings.database_url.clone()); let builder = Pool::builder() .max_size(settings.database_pool_max_size.unwrap_or(10)) From 0d5215fddb24ca07d899fcd83c65e51fe8b5d6d1 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Thu, 21 Apr 2022 18:54:53 -0400 Subject: [PATCH 3/9] oops! --- Makefile | 5 ++++- src/tokenserver/db/pool.rs | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a44b266428..43683d1aeb 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,13 @@ python: venv/bin/python -m pip install -r requirements.txt run: python - PATH=./venv/bin:$(PATH) RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml + PATH="./venv/bin:$(PATH)" RUST_LOG=debug RUST_BACKTRACE=full cargo run -- --config config/local.toml run_spanner: GOOGLE_APPLICATION_CREDENTIALS=$(PATH_TO_SYNC_SPANNER_KEYS) GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=$(PATH_TO_GRPC_CERT) make run test: SYNC_DATABASE_URL=$(SYNC_DATABASE_URL) SYNC_TOKENSERVER__DATABASE_URL=$(SYNC_TOKENSERVER__DATABASE_URL) RUST_TEST_THREADS=1 cargo test + +tokenserver_migrate: + diesel --database-url $(SYNC_TOKENSERVER__DATABASE_URL) migration --migration-dir src/tokenserver/migrations run diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index 50ca2aa76d..79eff967ba 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -3,7 +3,6 @@ use async_trait::async_trait; use diesel::{ mysql::MysqlConnection, r2d2::{ConnectionManager, Pool}, - Connection, }; #[cfg(test)] use diesel_logger::LoggingConnection; @@ -11,25 +10,26 @@ use std::time::Duration; use super::models::{Db, DbResult, TokenserverDb}; use crate::db::{error::DbError, DbErrorKind}; +#[cfg(test)] +use crate::diesel::Connection; use crate::server::metrics::Metrics; use crate::tokenserver::settings::Settings; #[cfg(test)] use crate::db::mysql::TestTransactionCustomizer; +#[cfg(test)] embed_migrations!("src/tokenserver/migrations"); /// Run the diesel embedded migrations /// /// Mysql DDL statements implicitly commit which could disrupt MysqlPool's /// begin_test_transaction during tests. So this runs on its own separate conn. +#[cfg(test)] pub fn run_embedded_migrations(database_url: &str) -> DbResult<()> { let conn = MysqlConnection::establish(database_url)?; - #[cfg(test)] embedded_migrations::run(&LoggingConnection::new(conn))?; - #[cfg(not(test))] - embedded_migrations::run(&conn)?; Ok(()) } @@ -47,6 +47,7 @@ impl TokenserverPool { metrics: &Metrics, _use_test_transactions: bool, ) -> DbResult { + #[cfg(test)] run_embedded_migrations(&settings.database_url)?; let manager = ConnectionManager::::new(settings.database_url.clone()); From 6d502bae6f1b7bada27a962d9021444fa6449f43 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Fri, 22 Apr 2022 13:44:02 -0400 Subject: [PATCH 4/9] only run migrations on non-release builds --- src/tokenserver/db/pool.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index 79eff967ba..60cffe73fc 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -4,13 +4,13 @@ use diesel::{ mysql::MysqlConnection, r2d2::{ConnectionManager, Pool}, }; -#[cfg(test)] +#[cfg(debug_assertions)] use diesel_logger::LoggingConnection; use std::time::Duration; use super::models::{Db, DbResult, TokenserverDb}; use crate::db::{error::DbError, DbErrorKind}; -#[cfg(test)] +#[cfg(debug_assertions)] use crate::diesel::Connection; use crate::server::metrics::Metrics; use crate::tokenserver::settings::Settings; @@ -18,14 +18,15 @@ use crate::tokenserver::settings::Settings; #[cfg(test)] use crate::db::mysql::TestTransactionCustomizer; -#[cfg(test)] +// We only want to embed and run the migrations in non-release builds +#[cfg(debug_assertions)] embed_migrations!("src/tokenserver/migrations"); /// Run the diesel embedded migrations /// /// Mysql DDL statements implicitly commit which could disrupt MysqlPool's /// begin_test_transaction during tests. So this runs on its own separate conn. -#[cfg(test)] +#[cfg(debug_assertions)] pub fn run_embedded_migrations(database_url: &str) -> DbResult<()> { let conn = MysqlConnection::establish(database_url)?; From 4080703b47638db48c5033b0446314e76963fc1f Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Fri, 22 Apr 2022 14:19:49 -0400 Subject: [PATCH 5/9] remove make task --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 43683d1aeb..baf0e07cce 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,3 @@ run_spanner: test: SYNC_DATABASE_URL=$(SYNC_DATABASE_URL) SYNC_TOKENSERVER__DATABASE_URL=$(SYNC_TOKENSERVER__DATABASE_URL) RUST_TEST_THREADS=1 cargo test - -tokenserver_migrate: - diesel --database-url $(SYNC_TOKENSERVER__DATABASE_URL) migration --migration-dir src/tokenserver/migrations run From b0f66b7c7dbea7859479592160abeeb69df07c8f Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Fri, 22 Apr 2022 14:20:52 -0400 Subject: [PATCH 6/9] fix cfg attribute --- src/tokenserver/db/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index 60cffe73fc..e677f01249 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -48,7 +48,7 @@ impl TokenserverPool { metrics: &Metrics, _use_test_transactions: bool, ) -> DbResult { - #[cfg(test)] + #[cfg(debug_assertions)] run_embedded_migrations(&settings.database_url)?; let manager = ConnectionManager::::new(settings.database_url.clone()); From e962da0f3fe4a70fc52ce102fba5c27e0c935ca6 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Fri, 22 Apr 2022 17:02:44 -0400 Subject: [PATCH 7/9] add tokenserver.run_migrations setting --- docker-compose.e2e.mysql.yaml | 1 + docker-compose.e2e.spanner.yaml | 1 + docker-compose.mysql.yaml | 1 + docker-compose.spanner.yaml | 23 ++++++++++++----------- src/settings.rs | 1 + src/tokenserver/db/pool.rs | 10 +++------- src/tokenserver/settings.rs | 3 +++ 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/docker-compose.e2e.mysql.yaml b/docker-compose.e2e.mysql.yaml index 4391d4488f..4ae5e4b0c6 100644 --- a/docker-compose.e2e.mysql.yaml +++ b/docker-compose.e2e.mysql.yaml @@ -33,6 +33,7 @@ services: SYNC_TOKENSERVER__FXA_BROWSERID_ISSUER: "api-accounts.stage.mozaws.net" SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api-accounts.stage.mozaws.net SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: secret0 + SYNC_TOKENSERVER__RUN_MIGRATIONS: true TOKENSERVER_HOST: http://localhost:8000 entrypoint: > /bin/sh -c " diff --git a/docker-compose.e2e.spanner.yaml b/docker-compose.e2e.spanner.yaml index 45e15e5200..7afb12ba05 100644 --- a/docker-compose.e2e.spanner.yaml +++ b/docker-compose.e2e.spanner.yaml @@ -34,6 +34,7 @@ services: SYNC_TOKENSERVER__FXA_BROWSERID_ISSUER: "api-accounts.stage.mozaws.net" SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api-accounts.stage.mozaws.net SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: secret0 + SYNC_TOKENSERVER__RUN_MIGRATIONS: true TOKENSERVER_HOST: http://localhost:8000 entrypoint: > /bin/sh -c " diff --git a/docker-compose.mysql.yaml b/docker-compose.mysql.yaml index 8becc48cb7..7ec1936c16 100644 --- a/docker-compose.mysql.yaml +++ b/docker-compose.mysql.yaml @@ -49,6 +49,7 @@ services: SYNC_MASTER_SECRET: secret0 SYNC_DATABASE_URL: mysql://test:test@sync-db:3306/syncstorage SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver + SYNC_TOKENSERVER__RUN_MIGRATIONS: true volumes: sync_db_data: diff --git a/docker-compose.spanner.yaml b/docker-compose.spanner.yaml index 5317d91138..4a5c13a91d 100644 --- a/docker-compose.spanner.yaml +++ b/docker-compose.spanner.yaml @@ -10,7 +10,7 @@ services: sync-db-setup: image: app:build depends_on: - - sync-db + - sync-db restart: "no" entrypoint: "/app/scripts/prepare-spanner.sh" environment: @@ -39,19 +39,20 @@ services: image: ${SYNCSTORAGE_RS_IMAGE:-syncstorage-rs:latest} restart: always ports: - - "8000:8000" + - "8000:8000" depends_on: - - sync-db-setup + - sync-db-setup environment: - SYNC_HOST: 0.0.0.0 - SYNC_MASTER_SECRET: secret0 - SYNC_DATABASE_URL: spanner://projects/test-project/instances/test-instance/databases/test-database - SYNC_SPANNER_EMULATOR_HOST: sync-db:9010 - SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver + SYNC_HOST: 0.0.0.0 + SYNC_MASTER_SECRET: secret0 + SYNC_DATABASE_URL: spanner://projects/test-project/instances/test-instance/databases/test-database + SYNC_SPANNER_EMULATOR_HOST: sync-db:9010 + SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver + SYNC_TOKENSERVER__RUN_MIGRATIONS: true volumes: tokenserver_db_data: -# Application runs off of port 8000. -# you can test if it's available with -# curl "http://localhost:8000/__heartbeat__" + # Application runs off of port 8000. + # you can test if it's available with + # curl "http://localhost:8000/__heartbeat__" diff --git a/src/settings.rs b/src/settings.rs index f106fdd56f..e1df42d27f 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -215,6 +215,7 @@ impl Settings { s.set_default("tokenserver.fxa_oauth_request_timeout", 10)?; s.set_default("tokenserver.node_type", "spanner")?; s.set_default("tokenserver.statsd_label", "syncstorage.tokenserver")?; + s.set_default("tokenserver.run_migrations", false)?; // Set Cors defaults s.set_default( diff --git a/src/tokenserver/db/pool.rs b/src/tokenserver/db/pool.rs index e677f01249..e9d0b6d081 100644 --- a/src/tokenserver/db/pool.rs +++ b/src/tokenserver/db/pool.rs @@ -4,13 +4,11 @@ use diesel::{ mysql::MysqlConnection, r2d2::{ConnectionManager, Pool}, }; -#[cfg(debug_assertions)] use diesel_logger::LoggingConnection; use std::time::Duration; use super::models::{Db, DbResult, TokenserverDb}; use crate::db::{error::DbError, DbErrorKind}; -#[cfg(debug_assertions)] use crate::diesel::Connection; use crate::server::metrics::Metrics; use crate::tokenserver::settings::Settings; @@ -18,15 +16,12 @@ use crate::tokenserver::settings::Settings; #[cfg(test)] use crate::db::mysql::TestTransactionCustomizer; -// We only want to embed and run the migrations in non-release builds -#[cfg(debug_assertions)] embed_migrations!("src/tokenserver/migrations"); /// Run the diesel embedded migrations /// /// Mysql DDL statements implicitly commit which could disrupt MysqlPool's /// begin_test_transaction during tests. So this runs on its own separate conn. -#[cfg(debug_assertions)] pub fn run_embedded_migrations(database_url: &str) -> DbResult<()> { let conn = MysqlConnection::establish(database_url)?; @@ -48,8 +43,9 @@ impl TokenserverPool { metrics: &Metrics, _use_test_transactions: bool, ) -> DbResult { - #[cfg(debug_assertions)] - run_embedded_migrations(&settings.database_url)?; + if settings.run_migrations { + run_embedded_migrations(&settings.database_url)?; + } let manager = ConnectionManager::::new(settings.database_url.clone()); let builder = Pool::builder() diff --git a/src/tokenserver/settings.rs b/src/tokenserver/settings.rs index 1538efad38..08a20bf4a0 100644 --- a/src/tokenserver/settings.rs +++ b/src/tokenserver/settings.rs @@ -46,6 +46,8 @@ pub struct Settings { pub node_type: NodeType, /// The label to be used when reporting Metrics. pub statsd_label: String, + /// Whether or not to run the Tokenserver migrations upon startup. + pub run_migrations: bool, } impl Default for Settings { @@ -68,6 +70,7 @@ impl Default for Settings { node_capacity_release_rate: None, node_type: NodeType::Spanner, statsd_label: "syncstorage.tokenserver".to_owned(), + run_migrations: false, } } } From 2af7979ed9e65f32e1e910d4f7062b17b9a2ee5d Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Fri, 22 Apr 2022 17:26:20 -0400 Subject: [PATCH 8/9] :( --- src/settings.rs | 2 +- src/tokenserver/settings.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings.rs b/src/settings.rs index e1df42d27f..5566e4a517 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -215,7 +215,7 @@ impl Settings { s.set_default("tokenserver.fxa_oauth_request_timeout", 10)?; s.set_default("tokenserver.node_type", "spanner")?; s.set_default("tokenserver.statsd_label", "syncstorage.tokenserver")?; - s.set_default("tokenserver.run_migrations", false)?; + s.set_default("tokenserver.run_migrations", cfg!(test))?; // Set Cors defaults s.set_default( diff --git a/src/tokenserver/settings.rs b/src/tokenserver/settings.rs index 08a20bf4a0..aa5459ac8f 100644 --- a/src/tokenserver/settings.rs +++ b/src/tokenserver/settings.rs @@ -70,7 +70,7 @@ impl Default for Settings { node_capacity_release_rate: None, node_type: NodeType::Spanner, statsd_label: "syncstorage.tokenserver".to_owned(), - run_migrations: false, + run_migrations: cfg!(test), } } } From 32df6834de3e1235fcb667eae949d37fa5cdd59f Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Mon, 25 Apr 2022 11:22:30 -0400 Subject: [PATCH 9/9] add quotes --- docker-compose.e2e.mysql.yaml | 2 +- docker-compose.e2e.spanner.yaml | 2 +- docker-compose.mysql.yaml | 2 +- docker-compose.spanner.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.e2e.mysql.yaml b/docker-compose.e2e.mysql.yaml index 4ae5e4b0c6..2f256d933d 100644 --- a/docker-compose.e2e.mysql.yaml +++ b/docker-compose.e2e.mysql.yaml @@ -33,7 +33,7 @@ services: SYNC_TOKENSERVER__FXA_BROWSERID_ISSUER: "api-accounts.stage.mozaws.net" SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api-accounts.stage.mozaws.net SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: secret0 - SYNC_TOKENSERVER__RUN_MIGRATIONS: true + SYNC_TOKENSERVER__RUN_MIGRATIONS: "true" TOKENSERVER_HOST: http://localhost:8000 entrypoint: > /bin/sh -c " diff --git a/docker-compose.e2e.spanner.yaml b/docker-compose.e2e.spanner.yaml index 7afb12ba05..d7dca5e5ff 100644 --- a/docker-compose.e2e.spanner.yaml +++ b/docker-compose.e2e.spanner.yaml @@ -34,7 +34,7 @@ services: SYNC_TOKENSERVER__FXA_BROWSERID_ISSUER: "api-accounts.stage.mozaws.net" SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api-accounts.stage.mozaws.net SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: secret0 - SYNC_TOKENSERVER__RUN_MIGRATIONS: true + SYNC_TOKENSERVER__RUN_MIGRATIONS: "true" TOKENSERVER_HOST: http://localhost:8000 entrypoint: > /bin/sh -c " diff --git a/docker-compose.mysql.yaml b/docker-compose.mysql.yaml index 7ec1936c16..3ea3d72e55 100644 --- a/docker-compose.mysql.yaml +++ b/docker-compose.mysql.yaml @@ -49,7 +49,7 @@ services: SYNC_MASTER_SECRET: secret0 SYNC_DATABASE_URL: mysql://test:test@sync-db:3306/syncstorage SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver - SYNC_TOKENSERVER__RUN_MIGRATIONS: true + SYNC_TOKENSERVER__RUN_MIGRATIONS: "true" volumes: sync_db_data: diff --git a/docker-compose.spanner.yaml b/docker-compose.spanner.yaml index 4a5c13a91d..3f510e697e 100644 --- a/docker-compose.spanner.yaml +++ b/docker-compose.spanner.yaml @@ -48,7 +48,7 @@ services: SYNC_DATABASE_URL: spanner://projects/test-project/instances/test-instance/databases/test-database SYNC_SPANNER_EMULATOR_HOST: sync-db:9010 SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver - SYNC_TOKENSERVER__RUN_MIGRATIONS: true + SYNC_TOKENSERVER__RUN_MIGRATIONS: "true" volumes: tokenserver_db_data: