1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

Revert "Revert "Update retraction of Server Pro 5.0.1" (#244)"

This reverts commit 2027c3ce4b.
This commit is contained in:
Jakob Ackermann 2024-04-24 11:41:12 +01:00
parent fc135d7380
commit b70eb528e4
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
2 changed files with 27 additions and 6 deletions

View file

@ -120,6 +120,7 @@ function handle_image_upgrade() {
if [[ ! "$should_upgrade" =~ [Yy] ]]; then
echo "Keeping image version '$IMAGE_VERSION'"
check_retracted_version
return 0
fi
@ -137,6 +138,24 @@ function handle_image_upgrade() {
fi
# Skip retraction check in sub-shells
export OVERLEAF_SKIP_RETRACTION_CHECK="$IMAGE_VERSION"
local version="$IMAGE_VERSION_MAJOR.$IMAGE_VERSION_MINOR.$IMAGE_VERSION_PATCH"
if [[ "$version" == "5.0.1" ]]; then
echo "-------------------------------------------------------"
echo "--------------------- WARNING -----------------------"
echo "-------------------------------------------------------"
echo " You are currently using a retracted version, $version."
echo ""
echo " We have identified a critical bug in a database migration that causes data loss in the history system."
echo " Please follow the steps of the recovery process in the following wiki page:"
echo " https://github.com/overleaf/overleaf/wiki/Doc-version-recovery"
echo "-------------------------------------------------------"
echo "--------------------- WARNING -----------------------"
echo "-------------------------------------------------------"
prompt "Are you following the recovery process?"
fi
## Offer to stop docker services
local services_stopped="false"
if services_up; then
@ -241,7 +260,6 @@ function __main__() {
read_seed_image_version
read_image_version
check_retracted_version
handle_rc_rebranding
handle_image_upgrade

View file

@ -20,6 +20,10 @@ function read_image_version() {
}
function check_retracted_version() {
if [[ "${OVERLEAF_SKIP_RETRACTION_CHECK:-null}" == "$IMAGE_VERSION" ]]; then
return
fi
local version="$IMAGE_VERSION_MAJOR.$IMAGE_VERSION_MINOR.$IMAGE_VERSION_PATCH"
if [[ "$version" == "5.0.1" ]]; then
echo "-------------------------------------------------------"
@ -27,11 +31,10 @@ function check_retracted_version() {
echo "-------------------------------------------------------"
echo " You are currently using a retracted version, $version."
echo ""
echo " We have identified a critical bug in a database migration that causes data loss."
echo " Please defer upgrading to release 5.0.1 until further notice on the mailing list."
echo " Please keep any backups that were taken prior to upgrading to version 5.0.1."
echo " Updates will be posted in the release notes:"
echo " https://github.com/overleaf/overleaf/wiki/Release-Notes-5.x.x#server-pro-501-retracted"
echo " We have identified a critical bug in a database migration that causes data loss in the history system."
echo " A new release is available with a fix and an automated recovery process."
echo " Please follow the steps of the recovery process in the following wiki page:"
echo " https://github.com/overleaf/overleaf/wiki/Doc-version-recovery"
echo "-------------------------------------------------------"
echo "--------------------- WARNING -----------------------"
echo "-------------------------------------------------------"