From dc78431e9a52504d882a1077aa706ec5fc49886f Mon Sep 17 00:00:00 2001 From: Max Stoiber Date: Tue, 16 Apr 2019 11:44:57 +0200 Subject: [PATCH 01/10] Add generate-table-diagram script --- scripts/generate-table-diagram.js | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 scripts/generate-table-diagram.js diff --git a/scripts/generate-table-diagram.js b/scripts/generate-table-diagram.js new file mode 100644 index 0000000000..2235afeadc --- /dev/null +++ b/scripts/generate-table-diagram.js @@ -0,0 +1,61 @@ +const r = require('rethinkdbdash')(); +const type = require('type-detect'); + +const REF_TABLE_MAP = { + creators: 'users', + authors: 'users', + senders: 'users', + communitys: 'communities', + watercoolers: 'threads', + parents: 'messages', +}; + +(async () => { + const tables = await r + .db('rethinkdb') + .table('table_config') + .filter({ + db: 'spectrum', + }) + .map(rec => rec('name')) + .run(); + + for (const table of tables) { + const [record] = await r + .db('spectrum') + .table(table) + .limit(1) + .run(); + + if (!record) { + // console.warn(`could not find record in table ${table}`); + } else { + let output = `Table ${table} {`; + Object.keys(record).forEach(key => { + let keyType = + key === 'id' || key.endsWith('Id') + ? 'uuid' + : key.endsWith('At') + ? 'Date' + : type(record[key]); + output += `\n ${key} ${keyType}`; + if (key.endsWith('Id')) { + let refTable = key.replace(/id$/i, '').toLowerCase() + 's'; + refTable = REF_TABLE_MAP[refTable] || refTable; + if (tables.includes(refTable)) { + output += ` [ref: < ${refTable}.id]`; + } + } + }); + output += `\n}\n`; + console.log(output); + } + } +})() + .then(() => { + process.exit(); + }) + .catch(err => { + console.error(err); + process.exit(1); + }); From f981d87cda053fcc42d9758240179c6641ebb0e8 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Wed, 17 Apr 2019 13:35:43 +0000 Subject: [PATCH 02/10] Update serialize-javascript to version 1.7.0 --- api/package.json | 2 +- api/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/package.json b/api/package.json index e5aea08f84..97ea62c3dd 100644 --- a/api/package.json +++ b/api/package.json @@ -119,7 +119,7 @@ "rethinkdb-migrate": "^1.4.0", "rethinkhaberdashery": "^2.3.32", "sanitize-filename": "^1.6.1", - "serialize-javascript": "^1.6.1", + "serialize-javascript": "^1.7.0", "session-rethinkdb": "^2.0.0", "slate": "^0.44.12", "slate-markdown": "0.1.0", diff --git a/api/yarn.lock b/api/yarn.lock index 38afd43dd5..12824394f7 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -8698,10 +8698,10 @@ serialize-javascript@^1.4.0: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ== -serialize-javascript@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" - integrity sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw== +serialize-javascript@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" + integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== serve-static@1.13.2: version "1.13.2" From 7e2aad7b94844c95a40bb7d482a382ba29e0db09 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Thu, 18 Apr 2019 12:17:50 -0400 Subject: [PATCH 03/10] Add new secrets for redis labs instance --- now.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/now.json b/now.json index 243c5a63ce..ee8e74147e 100644 --- a/now.json +++ b/now.json @@ -18,6 +18,9 @@ "COMPOSE_REDIS_PASSWORD": "@compose-redis-password", "COMPOSE_REDIS_URL": "@compose-redis-url", "COMPOSE_REDIS_PORT": "@compose-redis-port", + "REDIS_LABS_JOB_QUEUE_PASSWORD": "@redis-labs-job-queue-password", + "REDIS_LABS_JOB_QUEUE_URL": "@redis-labs-job-queue-url", + "REDIS_LABS_JOB_QUEUE_PORT": "@redis-labs-job-queue-port", "REDIS_CACHE_PORT": "@redis-labs-port", "REDIS_CACHE_URL": "@redis-labs-url", "REDIS_CACHE_PASSWORD": "@redis-labs-password", From 8aee8db7014ba30bc906ece01fb8e0f9ad400f9e Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Thu, 18 Apr 2019 12:18:02 -0400 Subject: [PATCH 04/10] Use new secrets in bull queue construction --- shared/bull/create-redis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/bull/create-redis.js b/shared/bull/create-redis.js index 52a8061bf4..0e2e87fd7c 100644 --- a/shared/bull/create-redis.js +++ b/shared/bull/create-redis.js @@ -4,9 +4,9 @@ import Redis from 'ioredis'; const config = process.env.NODE_ENV === 'production' && !process.env.FORCE_DEV ? { - port: process.env.COMPOSE_REDIS_PORT, - host: process.env.COMPOSE_REDIS_URL, - password: process.env.COMPOSE_REDIS_PASSWORD, + port: process.env.REDIS_LABS_JOB_QUEUE_PORT, + host: process.env.REDIS_LABS_JOB_QUEUE_URL, + password: process.env.REDIS_LABS_JOB_QUEUE_PASSWORD, } : undefined; // Use the local instance of Redis in development by not passing any connection string From c9f41642f717d493aedc289f9c775c9f7e3bda52 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Thu, 18 Apr 2019 12:18:13 -0400 Subject: [PATCH 05/10] Add missing packages to worker servers for deployments --- analytics/package.json | 1 + analytics/yarn.lock | 25 +++++++++++++++++++++++++ athena/package.json | 1 + athena/yarn.lock | 25 +++++++++++++++++++++++++ chronos/package.json | 1 + chronos/yarn.lock | 25 +++++++++++++++++++++++++ hermes/package.json | 1 + hermes/yarn.lock | 25 +++++++++++++++++++++++++ 8 files changed, 104 insertions(+) diff --git a/analytics/package.json b/analytics/package.json index 3424a9f9ac..9c0e71c4db 100644 --- a/analytics/package.json +++ b/analytics/package.json @@ -17,6 +17,7 @@ "performance-now": "^2.1.0", "raven": "^2.6.4", "redis-tag-cache": "^1.2.1", + "rethinkdb-changefeed-reconnect": "^0.3.2", "rethinkdb-inspector": "^0.3.3", "rethinkdbdash": "^2.3.31", "rethinkhaberdashery": "^2.3.32", diff --git a/analytics/yarn.lock b/analytics/yarn.lock index 9a01f861be..0967799b52 100644 --- a/analytics/yarn.lock +++ b/analytics/yarn.lock @@ -29,6 +29,14 @@ aws-sdk@^2.426.0: uuid "3.3.2" xml2js "0.4.19" +babel-runtime@^6.18.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -103,6 +111,11 @@ cookiejar@^2.1.0: resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== +core-js@^2.4.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -573,6 +586,18 @@ redis-tag-cache@^1.2.1: dependencies: ioredis "^4.0.0" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +rethinkdb-changefeed-reconnect@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/rethinkdb-changefeed-reconnect/-/rethinkdb-changefeed-reconnect-0.3.2.tgz#2999f5313205ab35d9ac2d1b0533765ee3376923" + integrity sha1-KZn1MTIFqzXZrC0bBTN2XuM3aSM= + dependencies: + babel-runtime "^6.18.0" + rethinkdb-inspector@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/rethinkdb-inspector/-/rethinkdb-inspector-0.3.3.tgz#f0d88c66d17e0234b5518ca51cd8c272cb787003" diff --git a/athena/package.json b/athena/package.json index e3cfb1293d..dc93098709 100644 --- a/athena/package.json +++ b/athena/package.json @@ -26,6 +26,7 @@ "react": "^16.8.6", "react-dom": "^16.8.6", "redis-tag-cache": "^1.2.1", + "rethinkdb-changefeed-reconnect": "^0.3.2", "rethinkdb-inspector": "^0.3.3", "rethinkdbdash": "^2.3.31", "rethinkhaberdashery": "^2.3.32", diff --git a/athena/yarn.lock b/athena/yarn.lock index c3eacbd121..9fc5af31b6 100644 --- a/athena/yarn.lock +++ b/athena/yarn.lock @@ -46,6 +46,14 @@ axios@^0.16.2: follow-redirects "^1.2.3" is-buffer "^1.1.5" +babel-runtime@^6.18.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -121,6 +129,11 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= +core-js@^2.4.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + crc@^3.5.0: version "3.8.0" resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" @@ -767,6 +780,18 @@ redis-tag-cache@^1.2.1: dependencies: ioredis "^4.0.0" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +rethinkdb-changefeed-reconnect@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/rethinkdb-changefeed-reconnect/-/rethinkdb-changefeed-reconnect-0.3.2.tgz#2999f5313205ab35d9ac2d1b0533765ee3376923" + integrity sha1-KZn1MTIFqzXZrC0bBTN2XuM3aSM= + dependencies: + babel-runtime "^6.18.0" + rethinkdb-inspector@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/rethinkdb-inspector/-/rethinkdb-inspector-0.3.3.tgz#f0d88c66d17e0234b5518ca51cd8c272cb787003" diff --git a/chronos/package.json b/chronos/package.json index 2cf11f22ab..d461ae3538 100644 --- a/chronos/package.json +++ b/chronos/package.json @@ -18,6 +18,7 @@ "performance-now": "^2.1.0", "raven": "^2.6.4", "redis-tag-cache": "^1.2.1", + "rethinkdb-changefeed-reconnect": "^0.3.2", "rethinkdb-inspector": "^0.3.3", "rethinkdbdash": "^2.3.31", "rethinkhaberdashery": "^2.3.32", diff --git a/chronos/yarn.lock b/chronos/yarn.lock index fb21e229ed..0d0f0083f2 100644 --- a/chronos/yarn.lock +++ b/chronos/yarn.lock @@ -22,6 +22,14 @@ aws-sdk@^2.426.0: uuid "3.3.2" xml2js "0.4.19" +babel-runtime@^6.18.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -90,6 +98,11 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= +core-js@^2.4.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + crc@^3.5.0: version "3.8.0" resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" @@ -710,6 +723,18 @@ redis-tag-cache@^1.2.1: dependencies: ioredis "^4.0.0" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +rethinkdb-changefeed-reconnect@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/rethinkdb-changefeed-reconnect/-/rethinkdb-changefeed-reconnect-0.3.2.tgz#2999f5313205ab35d9ac2d1b0533765ee3376923" + integrity sha1-KZn1MTIFqzXZrC0bBTN2XuM3aSM= + dependencies: + babel-runtime "^6.18.0" + rethinkdb-inspector@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/rethinkdb-inspector/-/rethinkdb-inspector-0.3.3.tgz#f0d88c66d17e0234b5518ca51cd8c272cb787003" diff --git a/hermes/package.json b/hermes/package.json index 7382d08a90..f2777ebabc 100644 --- a/hermes/package.json +++ b/hermes/package.json @@ -19,6 +19,7 @@ "performance-now": "^2.1.0", "raven": "^2.6.4", "redis-tag-cache": "^1.2.1", + "rethinkdb-changefeed-reconnect": "^0.3.2", "rethinkdb-inspector": "^0.3.3", "rethinkdbdash": "^2.3.31", "rethinkhaberdashery": "^2.3.32", diff --git a/hermes/yarn.lock b/hermes/yarn.lock index 977da5fba5..c507771e1f 100644 --- a/hermes/yarn.lock +++ b/hermes/yarn.lock @@ -123,6 +123,14 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +babel-runtime@^6.18.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -225,6 +233,11 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= +core-js@^2.4.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -972,6 +985,11 @@ redis-tag-cache@^1.2.1: dependencies: ioredis "^4.0.0" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + request@^2.81.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" @@ -998,6 +1016,13 @@ request@^2.81.0: tunnel-agent "^0.6.0" uuid "^3.3.2" +rethinkdb-changefeed-reconnect@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/rethinkdb-changefeed-reconnect/-/rethinkdb-changefeed-reconnect-0.3.2.tgz#2999f5313205ab35d9ac2d1b0533765ee3376923" + integrity sha1-KZn1MTIFqzXZrC0bBTN2XuM3aSM= + dependencies: + babel-runtime "^6.18.0" + rethinkdb-inspector@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/rethinkdb-inspector/-/rethinkdb-inspector-0.3.3.tgz#f0d88c66d17e0234b5518ca51cd8c272cb787003" From b3958202a31a9655d4fadb52f82f24facae981d0 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Thu, 18 Apr 2019 18:35:27 +0000 Subject: [PATCH 06/10] Update aws-sdk to version 2.439.0 --- analytics/package.json | 2 +- analytics/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/analytics/package.json b/analytics/package.json index 9c0e71c4db..6acb1ed768 100644 --- a/analytics/package.json +++ b/analytics/package.json @@ -5,7 +5,7 @@ }, "dependencies": { "amplitude": "^3.5.0", - "aws-sdk": "^2.426.0", + "aws-sdk": "^2.439.0", "bull": "3.3.10", "datadog-metrics": "^0.8.1", "debug": "^4.1.1", diff --git a/analytics/yarn.lock b/analytics/yarn.lock index 0967799b52..af66f0d731 100644 --- a/analytics/yarn.lock +++ b/analytics/yarn.lock @@ -14,10 +14,10 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -aws-sdk@^2.426.0: - version "2.426.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.426.0.tgz#cf17361c987daf518f945218f06135fbc1a3690d" - integrity sha512-S4nmIhF/6iYeVEmKUWVG03zo1sw3zELoAPGqBKIZ3isrXbxkFXdP2cgIQxqi37zwWXSqaxt0xjeXVOMLzN6vSg== +aws-sdk@^2.439.0: + version "2.439.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.439.0.tgz#4a1d177507ef80b0b515c043938d814777645c40" + integrity sha512-u7hCAMzpWbD6BqAwVHxr3cbm4YSbs0yv4crr7+bR/peM+UB6AbQLJFjFXx73dnIZq3R0Hr1bA7nh2Z9jkQLUdQ== dependencies: buffer "4.9.1" events "1.1.1" From 0c5416a581b62283d348a7dc8207047ab7324900 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Thu, 18 Apr 2019 18:45:24 +0000 Subject: [PATCH 07/10] Update aws-sdk to version 2.439.0 --- athena/package.json | 2 +- athena/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/athena/package.json b/athena/package.json index dc93098709..c30d5f2fa1 100644 --- a/athena/package.json +++ b/athena/package.json @@ -4,7 +4,7 @@ "start": "NODE_ENV=production node main.js" }, "dependencies": { - "aws-sdk": "^2.426.0", + "aws-sdk": "^2.439.0", "axios": "^0.16.2", "bull": "3.3.10", "cryptr": "^3.0.0", diff --git a/athena/yarn.lock b/athena/yarn.lock index 9fc5af31b6..6274317609 100644 --- a/athena/yarn.lock +++ b/athena/yarn.lock @@ -23,10 +23,10 @@ asn1.js@^5.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -aws-sdk@^2.426.0: - version "2.426.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.426.0.tgz#cf17361c987daf518f945218f06135fbc1a3690d" - integrity sha512-S4nmIhF/6iYeVEmKUWVG03zo1sw3zELoAPGqBKIZ3isrXbxkFXdP2cgIQxqi37zwWXSqaxt0xjeXVOMLzN6vSg== +aws-sdk@^2.439.0: + version "2.439.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.439.0.tgz#4a1d177507ef80b0b515c043938d814777645c40" + integrity sha512-u7hCAMzpWbD6BqAwVHxr3cbm4YSbs0yv4crr7+bR/peM+UB6AbQLJFjFXx73dnIZq3R0Hr1bA7nh2Z9jkQLUdQ== dependencies: buffer "4.9.1" events "1.1.1" From e68cf2c0ee55e7a9d56560cbf2cfc6678096d5a4 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Thu, 18 Apr 2019 19:10:39 +0000 Subject: [PATCH 08/10] Update aws-sdk to version 2.439.0 --- hermes/package.json | 2 +- hermes/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hermes/package.json b/hermes/package.json index f2777ebabc..e91d1291ba 100644 --- a/hermes/package.json +++ b/hermes/package.json @@ -4,7 +4,7 @@ }, "dependencies": { "@sendgrid/mail": "^6.3.1", - "aws-sdk": "^2.426.0", + "aws-sdk": "^2.439.0", "bull": "3.3.10", "datadog-metrics": "^0.8.1", "debug": "^4.1.1", diff --git a/hermes/yarn.lock b/hermes/yarn.lock index c507771e1f..12005cfbc5 100644 --- a/hermes/yarn.lock +++ b/hermes/yarn.lock @@ -98,10 +98,10 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -aws-sdk@^2.426.0: - version "2.426.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.426.0.tgz#cf17361c987daf518f945218f06135fbc1a3690d" - integrity sha512-S4nmIhF/6iYeVEmKUWVG03zo1sw3zELoAPGqBKIZ3isrXbxkFXdP2cgIQxqi37zwWXSqaxt0xjeXVOMLzN6vSg== +aws-sdk@^2.439.0: + version "2.439.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.439.0.tgz#4a1d177507ef80b0b515c043938d814777645c40" + integrity sha512-u7hCAMzpWbD6BqAwVHxr3cbm4YSbs0yv4crr7+bR/peM+UB6AbQLJFjFXx73dnIZq3R0Hr1bA7nh2Z9jkQLUdQ== dependencies: buffer "4.9.1" events "1.1.1" From 98399a867002039c92f75827d5211e99370d4d53 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Thu, 18 Apr 2019 19:20:24 +0000 Subject: [PATCH 09/10] Update aws-sdk to version 2.439.0 --- vulcan/package.json | 2 +- vulcan/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vulcan/package.json b/vulcan/package.json index ecfb41c8ad..24826e0805 100644 --- a/vulcan/package.json +++ b/vulcan/package.json @@ -4,7 +4,7 @@ }, "dependencies": { "algoliasearch": "^3.32.1", - "aws-sdk": "^2.426.0", + "aws-sdk": "^2.439.0", "bull": "^3.7.0", "datadog-metrics": "^0.8.1", "debug": "^4.1.1", diff --git a/vulcan/yarn.lock b/vulcan/yarn.lock index f4b0f05576..537fa6a6c2 100644 --- a/vulcan/yarn.lock +++ b/vulcan/yarn.lock @@ -33,10 +33,10 @@ asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -aws-sdk@^2.426.0: - version "2.426.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.426.0.tgz#cf17361c987daf518f945218f06135fbc1a3690d" - integrity sha512-S4nmIhF/6iYeVEmKUWVG03zo1sw3zELoAPGqBKIZ3isrXbxkFXdP2cgIQxqi37zwWXSqaxt0xjeXVOMLzN6vSg== +aws-sdk@^2.439.0: + version "2.439.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.439.0.tgz#4a1d177507ef80b0b515c043938d814777645c40" + integrity sha512-u7hCAMzpWbD6BqAwVHxr3cbm4YSbs0yv4crr7+bR/peM+UB6AbQLJFjFXx73dnIZq3R0Hr1bA7nh2Z9jkQLUdQ== dependencies: buffer "4.9.1" events "1.1.1" From 1f24ac5cac5a611f1be00ade19519c587623e25e Mon Sep 17 00:00:00 2001 From: Max Stoiber Date: Wed, 24 Apr 2019 09:44:04 +0200 Subject: [PATCH 10/10] Connect to both rethinkdb portals in production --- now.json | 2 ++ shared/db/db.js | 36 ++++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/now.json b/now.json index ee8e74147e..25e168fe97 100644 --- a/now.json +++ b/now.json @@ -12,6 +12,8 @@ "COMPOSE_RETHINKDB_PASSWORD": "@github-compose-rethinkdb-password", "COMPOSE_RETHINKDB_URL": "@github-compose-rethinkdb-url", "COMPOSE_RETHINKDB_PORT": "@github-compose-rethinkdb-port", + "BACKUP_RETHINKDB_URL": "@backup-compose-rethinkdb-url", + "BACKUP_RETHINKDB_PORT": "@backup-compose-rethinkdb-port", "AWS_RETHINKDB_PASSWORD": "@aws-rethinkdb-password", "AWS_RETHINKDB_URL": "@aws-rethinkdb-url", "AWS_RETHINKDB_PORT": "@aws-rethinkdb-port", diff --git a/shared/db/db.js b/shared/db/db.js index 13be06daa7..05c86f6239 100644 --- a/shared/db/db.js +++ b/shared/db/db.js @@ -31,16 +31,32 @@ if (!ca && IS_PROD) ); const PRODUCTION_CONFIG = { - password: process.env.COMPOSE_RETHINKDB_PASSWORD, - host: process.env.COMPOSE_RETHINKDB_URL, - port: process.env.COMPOSE_RETHINKDB_PORT, - ...(ca - ? { - ssl: { - ca, - }, - } - : {}), + servers: [ + { + password: process.env.COMPOSE_RETHINKDB_PASSWORD, + host: process.env.COMPOSE_RETHINKDB_URL, + port: process.env.COMPOSE_RETHINKDB_PORT, + ...(ca + ? { + ssl: { + ca, + }, + } + : {}), + }, + { + password: process.env.COMPOSE_RETHINKDB_PASSWORD, + host: process.env.BACKUP_RETHINKDB_URL, + port: process.env.BACKUP_RETHINKDB_PORT, + ...(ca + ? { + ssl: { + ca, + }, + } + : {}), + }, + ], }; const config = IS_PROD