diff --git a/services/chat/docker-compose.ci.yml b/services/chat/docker-compose.ci.yml index f9eeb13b05..cc5d75f7b4 100644 --- a/services/chat/docker-compose.ci.yml +++ b/services/chat/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -42,7 +42,7 @@ services: command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs . user: root mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/chat/docker-compose.yml b/services/chat/docker-compose.yml index e67a390534..fae8edbba1 100644 --- a/services/chat/docker-compose.yml +++ b/services/chat/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -44,7 +44,7 @@ services: command: npm run --silent test:acceptance mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/clsi/docker-compose.ci.yml b/services/clsi/docker-compose.ci.yml index f1371362b4..5c2943073d 100644 --- a/services/clsi/docker-compose.ci.yml +++ b/services/clsi/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/clsi/docker-compose.yml b/services/clsi/docker-compose.yml index 388f2d839f..c7b10cbbb4 100644 --- a/services/clsi/docker-compose.yml +++ b/services/clsi/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/contacts/docker-compose.ci.yml b/services/contacts/docker-compose.ci.yml index f9eeb13b05..cc5d75f7b4 100644 --- a/services/contacts/docker-compose.ci.yml +++ b/services/contacts/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -42,7 +42,7 @@ services: command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs . user: root mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/contacts/docker-compose.yml b/services/contacts/docker-compose.yml index 47aa25e7aa..2982e32457 100644 --- a/services/contacts/docker-compose.yml +++ b/services/contacts/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -44,7 +44,7 @@ services: command: npm run --silent test:acceptance mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/docstore/docker-compose.ci.yml b/services/docstore/docker-compose.ci.yml index 8163d53b7b..56b6fc9ac7 100644 --- a/services/docstore/docker-compose.ci.yml +++ b/services/docstore/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -51,7 +51,7 @@ services: command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs . user: root mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/docstore/docker-compose.yml b/services/docstore/docker-compose.yml index 5a6df54c60..cc84f519f0 100644 --- a/services/docstore/docker-compose.yml +++ b/services/docstore/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -53,7 +53,7 @@ services: command: npm run --silent test:acceptance mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/document-updater/docker-compose.ci.yml b/services/document-updater/docker-compose.ci.yml index 20555a8e54..e536ed999d 100644 --- a/services/document-updater/docker-compose.ci.yml +++ b/services/document-updater/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -51,7 +51,7 @@ services: retries: 20 mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml index aa7e4e2727..c14ffad9da 100644 --- a/services/document-updater/docker-compose.yml +++ b/services/document-updater/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -53,7 +53,7 @@ services: retries: 20 mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/filestore/docker-compose.ci.yml b/services/filestore/docker-compose.ci.yml index 63f1286d5a..4b4f9766a2 100644 --- a/services/filestore/docker-compose.ci.yml +++ b/services/filestore/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/filestore/docker-compose.yml b/services/filestore/docker-compose.yml index 71ef317b98..944163dcf9 100644 --- a/services/filestore/docker-compose.yml +++ b/services/filestore/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/notifications/docker-compose.ci.yml b/services/notifications/docker-compose.ci.yml index f9eeb13b05..cc5d75f7b4 100644 --- a/services/notifications/docker-compose.ci.yml +++ b/services/notifications/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -42,7 +42,7 @@ services: command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs . user: root mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/notifications/docker-compose.yml b/services/notifications/docker-compose.yml index 745a24c842..8ec4d656a5 100644 --- a/services/notifications/docker-compose.yml +++ b/services/notifications/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -44,7 +44,7 @@ services: command: npm run --silent test:acceptance mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/real-time/docker-compose.ci.yml b/services/real-time/docker-compose.ci.yml index a55b372369..e2bdcaf6e2 100644 --- a/services/real-time/docker-compose.ci.yml +++ b/services/real-time/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/real-time/docker-compose.yml b/services/real-time/docker-compose.yml index 688626be4b..c9f4bf51a0 100644 --- a/services/real-time/docker-compose.yml +++ b/services/real-time/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" diff --git a/services/spelling/docker-compose.ci.yml b/services/spelling/docker-compose.ci.yml index f9eeb13b05..cc5d75f7b4 100644 --- a/services/spelling/docker-compose.ci.yml +++ b/services/spelling/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -42,7 +42,7 @@ services: command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs . user: root mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/spelling/docker-compose.yml b/services/spelling/docker-compose.yml index b41743ab7c..675237f39f 100644 --- a/services/spelling/docker-compose.yml +++ b/services/spelling/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -50,7 +50,7 @@ services: command: npm run --silent test:acceptance mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/track-changes/docker-compose.ci.yml b/services/track-changes/docker-compose.ci.yml index 28f286d370..2fb8c9b605 100644 --- a/services/track-changes/docker-compose.ci.yml +++ b/services/track-changes/docker-compose.ci.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -58,7 +58,7 @@ services: retries: 20 mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/track-changes/docker-compose.yml b/services/track-changes/docker-compose.yml index 78b6b6b28e..ed4bd4ca9b 100644 --- a/services/track-changes/docker-compose.yml +++ b/services/track-changes/docker-compose.yml @@ -1,6 +1,6 @@ # This file was auto-generated, do not edit it directly. # Instead run bin/update_build_scripts from -# https://github.com/sharelatex/sharelatex-dev-environment +# https://github.com/overleaf/internal/ version: "2.3" @@ -60,7 +60,7 @@ services: retries: 20 mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 healthcheck: test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'" interval: 1s diff --git a/services/web/docker-compose.ci.yml b/services/web/docker-compose.ci.yml index cdf49fd993..1abf6d5176 100644 --- a/services/web/docker-compose.ci.yml +++ b/services/web/docker-compose.ci.yml @@ -91,7 +91,7 @@ services: image: redis mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 ldap: restart: always diff --git a/services/web/docker-compose.yml b/services/web/docker-compose.yml index ca38a11d22..9a5a03b709 100644 --- a/services/web/docker-compose.yml +++ b/services/web/docker-compose.yml @@ -89,7 +89,7 @@ services: image: redis mongo: - image: mongo:4.2.15 + image: mongo:4.4.16 ldap: restart: always diff --git a/services/web/migrations/20220825160708_recreate_dropboxEntities.js b/services/web/migrations/20220825160708_recreate_dropboxEntities.js new file mode 100644 index 0000000000..628d11eb1c --- /dev/null +++ b/services/web/migrations/20220825160708_recreate_dropboxEntities.js @@ -0,0 +1,32 @@ +const Helpers = require('./lib/helpers') + +exports.tags = ['saas'] + +const indexes = [ + { + key: { 'overleaf.userId': 1, 'dropbox.id': 1 }, + name: 'overleaf.userId_1_dropbox.id_1', + unique: true, + partialFilterExpression: { 'dropbox.id': { $exists: true } }, + }, + { + key: { 'overleaf.userId': 1, 'overleaf.id': 1 }, + name: 'overleaf.userId_1_overleaf.id_1', + unique: true, + partialFilterExpression: { 'overleaf.id': { $exists: true } }, + }, + { key: { 'overleaf.userId': 1, 'dropbox.pathLower': 'hashed' } }, +] + +exports.migrate = async client => { + const { db } = client + // Forcibly drop the dropboxEntities collection. The new structure is + // different and we don't want to keep the data with the old structure around. + await db.dropboxEntities.drop() + await Helpers.addIndexesToCollection(db.dropboxEntities, indexes) +} + +exports.rollback = async client => { + const { db } = client + await Helpers.dropIndexesFromCollection(db.dropboxEntities, indexes) +}