Skip to content

Commit c36e02b

Browse files
authored
Merge pull request overleaf#242 from overleaf/jpa-ease-retraction
Update retraction of Server Pro 5.0.1
2 parents 5243b68 + 6839f9a commit c36e02b

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

bin/upgrade

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function handle_image_upgrade() {
120120

121121
if [[ ! "$should_upgrade" =~ [Yy] ]]; then
122122
echo "Keeping image version '$IMAGE_VERSION'"
123+
check_retracted_version
123124
return 0
124125
fi
125126

@@ -137,6 +138,24 @@ function handle_image_upgrade() {
137138
fi
138139

139140

141+
# Skip retraction check in sub-shells
142+
export OVERLEAF_SKIP_RETRACTION_CHECK="$IMAGE_VERSION"
143+
local version="$IMAGE_VERSION_MAJOR.$IMAGE_VERSION_MINOR.$IMAGE_VERSION_PATCH"
144+
if [[ "$version" == "5.0.1" ]]; then
145+
echo "-------------------------------------------------------"
146+
echo "--------------------- WARNING -----------------------"
147+
echo "-------------------------------------------------------"
148+
echo " You are currently using a retracted version, $version."
149+
echo ""
150+
echo " We have identified a critical bug in a database migration that causes data loss in the history system."
151+
echo " Please follow the steps of the recovery process in the following wiki page:"
152+
echo " https://github.com/overleaf/overleaf/wiki/Doc-version-recovery"
153+
echo "-------------------------------------------------------"
154+
echo "--------------------- WARNING -----------------------"
155+
echo "-------------------------------------------------------"
156+
prompt "Are you following the recovery process?"
157+
fi
158+
140159
## Offer to stop docker services
141160
local services_stopped="false"
142161
if services_up; then
@@ -241,7 +260,6 @@ function __main__() {
241260

242261
read_seed_image_version
243262
read_image_version
244-
check_retracted_version
245263
handle_rc_rebranding
246264
handle_image_upgrade
247265

lib/shared-functions.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ function read_image_version() {
2020
}
2121

2222
function check_retracted_version() {
23+
if [[ "${OVERLEAF_SKIP_RETRACTION_CHECK:-null}" == "$IMAGE_VERSION" ]]; then
24+
return
25+
fi
26+
2327
local version="$IMAGE_VERSION_MAJOR.$IMAGE_VERSION_MINOR.$IMAGE_VERSION_PATCH"
2428
if [[ "$version" == "5.0.1" ]]; then
2529
echo "-------------------------------------------------------"
2630
echo "--------------------- WARNING -----------------------"
2731
echo "-------------------------------------------------------"
2832
echo " You are currently using a retracted version, $version."
2933
echo ""
30-
echo " We have identified a critical bug in a database migration that causes data loss."
31-
echo " Please defer upgrading to release 5.0.1 until further notice on the mailing list."
32-
echo " Please keep any backups that were taken prior to upgrading to version 5.0.1."
33-
echo " Updates will be posted in the release notes:"
34-
echo " https://github.com/overleaf/overleaf/wiki/Release-Notes-5.x.x#server-pro-501-retracted"
34+
echo " We have identified a critical bug in a database migration that causes data loss in the history system."
35+
echo " A new release is available with a fix and an automated recovery process."
36+
echo " Please follow the steps of the recovery process in the following wiki page:"
37+
echo " https://github.com/overleaf/overleaf/wiki/Doc-version-recovery"
3538
echo "-------------------------------------------------------"
3639
echo "--------------------- WARNING -----------------------"
3740
echo "-------------------------------------------------------"

0 commit comments

Comments
 (0)