Просмотр исходного кода

Merge pull request #16849 from overleaf/hb-issue-16799-mongdodb-v5-to-v6

Bump mongo from 5 to 6 in the dev environment

GitOrigin-RevId: 7b5aa0be57e93e1788acf55405e645556c8eaa13
Hendrik Bonthuys 2 лет назад
Родитель
Сommit
f2bea32dd8

+ 2 - 2
services/chat/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/chat/docker-compose.ci.yml

@@ -42,9 +42,9 @@ services:
     command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
     user: root
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20

+ 2 - 2
services/chat/docker-compose.yml

@@ -44,10 +44,10 @@ services:
     command: npm run --silent test:acceptance
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/contacts/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/contacts/docker-compose.ci.yml

@@ -42,9 +42,9 @@ services:
     command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
     user: root
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20

+ 2 - 2
services/contacts/docker-compose.yml

@@ -44,10 +44,10 @@ services:
     command: npm run --silent test:acceptance
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/docstore/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/docstore/docker-compose.ci.yml

@@ -50,10 +50,10 @@ services:
     command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
     user: root
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
   gcs:

+ 2 - 2
services/docstore/docker-compose.yml

@@ -52,10 +52,10 @@ services:
     command: npm run --silent test:acceptance
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/document-updater/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/document-updater/docker-compose.ci.yml

@@ -51,9 +51,9 @@ services:
       retries: 20
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20

+ 2 - 2
services/document-updater/docker-compose.yml

@@ -53,10 +53,10 @@ services:
       retries: 20
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/history-v1/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/history-v1/docker-compose.ci.yml

@@ -49,10 +49,10 @@ services:
     command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
     user: root
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
   postgres:

+ 2 - 2
services/history-v1/docker-compose.yml

@@ -51,10 +51,10 @@ services:
     command: npm run --silent test:acceptance
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/notifications/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/notifications/docker-compose.ci.yml

@@ -42,9 +42,9 @@ services:
     command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
     user: root
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20

+ 2 - 2
services/notifications/docker-compose.yml

@@ -44,10 +44,10 @@ services:
     command: npm run --silent test:acceptance
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/project-history/Makefile

@@ -91,11 +91,11 @@ test_acceptance_clean:
 test_acceptance_pre_run:
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
 	$(DOCKER_COMPOSE_TEST_ACCEPTANCE) run --rm test_acceptance test/acceptance/js/scripts/pre-run
 endif

+ 2 - 2
services/project-history/docker-compose.ci.yml

@@ -51,9 +51,9 @@ services:
       retries: 20
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20

+ 2 - 2
services/project-history/docker-compose.yml

@@ -53,10 +53,10 @@ services:
       retries: 20
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
     healthcheck:
-      test: "mongo --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
+      test: "mongosh --quiet localhost/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)'"
       interval: 1s
       retries: 20
 

+ 2 - 2
services/web/Makefile

@@ -161,11 +161,11 @@ test_frontend_ct_editor:
 TEST_ACCEPTANCE_MONGO_INIT := \
 	$(DOCKER_COMPOSE) up -d mongo; \
 	$(DOCKER_COMPOSE) exec -T mongo sh -c ' \
-		while ! mongo --eval "db.version()" > /dev/null; do \
+		while ! mongosh --eval "db.version()" > /dev/null; do \
 			echo "Waiting for Mongo..."; \
 			sleep 1; \
 		done; \
-		mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
+		mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
 
 test_acceptance: test_acceptance_app test_acceptance_modules
 test_acceptance_saas: test_acceptance_app_saas test_acceptance_modules_merged_saas

+ 1 - 1
services/web/docker-compose.ci.yml

@@ -80,7 +80,7 @@ services:
     image: redis
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
 
   ldap:

+ 1 - 1
services/web/docker-compose.yml

@@ -79,7 +79,7 @@ services:
     image: redis
 
   mongo:
-    image: mongo:5.0.17
+    image: mongo:6.0.13
     command: --replSet overleaf
 
   ldap: