overleaf / toolkit

GNU Affero General Public License v3.0
510 stars 122 forks source link

Update retraction of Server Pro 5.0.1 #242

Closed das7pad closed 2 months ago

das7pad commented 2 months ago

Description

Follow up for #240 Part of https://github.com/overleaf/internal/issues/18037

This PR is updating the retraction message for 5.0.1 and letting bin/upgrade complete an upgrade to 5.0.2.

Warn when staying on 5.0.1

toolkit$ bin/upgrade 
Warning: current branch is not master, 'jpa-ease-retraction' instead
Checking for code update...
No code update available for download
New docker image version available (5.0.2)
Current image version is '5.0.1' (from config/version)
Upgrade image? [y/n] n
Keeping image version '5.0.1'
-------------------------------------------------------
---------------------  WARNING  -----------------------
-------------------------------------------------------
  You are currently using a retracted version, 5.0.1.

  We have identified a critical bug in a database migration that causes data loss in the history system.
  A new release is available with a fix and an automated recovery process.
  Please follow the steps of the recovery process in the following wiki page:
  https://github.com/overleaf/overleaf/wiki/Doc-version-recovery
-------------------------------------------------------
---------------------  WARNING  -----------------------
-------------------------------------------------------

Allow upgrade, show prompt for recovery process and allow stopping of containers

toolkit$ bin/upgrade 
Warning: current branch is not master, 'jpa-ease-retraction' instead
Checking for code update...
No code update available for download
New docker image version available (5.0.2)
Current image version is '5.0.1' (from config/version)
Upgrade image? [y/n] y
Upgrading config/version from 5.0.1 to 5.0.2
-------------------------------------------------------
---------------------  WARNING  -----------------------
-------------------------------------------------------
  You are currently using a retracted version, 5.0.1.

  We have identified a critical bug in a database migration that causes data loss in the history system.
  Please follow the steps of the recovery process in the following wiki page:
  https://github.com/overleaf/overleaf/wiki/Doc-version-recovery
-------------------------------------------------------
---------------------  WARNING  -----------------------
-------------------------------------------------------
Are you following the recovery process? (y/n): y
docker services are up, stop them first?
Stop docker services? [y/n] y
Stopping docker services
[+] Stopping 3/3
 ✔ Container sharelatex  Stopped                                                                                                                                                                                                                                                    60.4s 
 ✔ Container mongo       Stopped                                                                                                                                                                                                                                                     0.8s 
 ✔ Container redis       Stopped                                                                                                                                                                                                                                                     0.4s 
At this point, we recommend backing up your data before proceeding
!! WARNING: Only do this while the docker services are stopped!!
Proceed with the upgrade? [y/n] y
Backing up old version file to config/__old-version
Over-writing config/version with 5.0.2
Start docker services again? [y/n] y
Starting docker services
[+] Running 3/3
 ✔ Container mongo       Healthy                                                                                                                                                                                                                                                     0.0s 
 ✔ Container redis       Started                                                                                                                                                                                                                                                     0.0s 
 ✔ Container sharelatex  Started                                                                                                                                                                                                                                                     0.0s 
Done

Related issues / Pull Requests

Follow up for #240 Part of https://github.com/overleaf/internal/issues/18037

Contributor Agreement