From 45296c81b0fe03cf8d2d4fe3d723979ef12908be Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Thu, 16 Mar 2023 17:53:52 +0100 Subject: [PATCH] Merge pull request #12275 from overleaf/msm-hotfix-3-5-3 [CE/SP] Hotfix 3.5.3 GitOrigin-RevId: a095ba799367dca182c9942aa2b8cdf8c46911f0 --- server-ce/hotfix/3.5.3/Dockerfile | 5 +++++ .../hotfix/3.5.3/remove_stats_collection.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 server-ce/hotfix/3.5.3/Dockerfile create mode 100644 server-ce/hotfix/3.5.3/remove_stats_collection.patch diff --git a/server-ce/hotfix/3.5.3/Dockerfile b/server-ce/hotfix/3.5.3/Dockerfile new file mode 100644 index 0000000000..8b1ee4b951 --- /dev/null +++ b/server-ce/hotfix/3.5.3/Dockerfile @@ -0,0 +1,5 @@ +FROM sharelatex/sharelatex:3.5.2 + +# Patch: remove stats collection from history migration script +COPY remove_stats_collection.patch . +RUN patch -p0 < remove_stats_collection.patch diff --git a/server-ce/hotfix/3.5.3/remove_stats_collection.patch b/server-ce/hotfix/3.5.3/remove_stats_collection.patch new file mode 100644 index 0000000000..3f4c7b6636 --- /dev/null +++ b/server-ce/hotfix/3.5.3/remove_stats_collection.patch @@ -0,0 +1,16 @@ +--- services/web/scripts/history/migrate_history.js ++++ services/web/scripts/history/migrate_history.js +@@ -110,14 +110,6 @@ async function findProjectsToMigrate() { + process.exit(1) + } + +- // Find the total number of history records for the projects we need to migrate +- let docHistoryCount = 0 +- for await (const project of projectsToMigrate) { +- const count = await countDocHistory({ project_id: project._id }) +- docHistoryCount += count +- } +- +- console.log('Total history records to migrate:', docHistoryCount) + return projectsToMigrate + }