@@ -120,6 +120,7 @@ function handle_image_upgrade() {
120
120
121
121
if [[ ! " $should_upgrade " =~ [Yy] ]]; then
122
122
echo " Keeping image version '$IMAGE_VERSION '"
123
+ check_retracted_version
123
124
return 0
124
125
fi
125
126
@@ -137,6 +138,24 @@ function handle_image_upgrade() {
137
138
fi
138
139
139
140
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
+
140
159
# # Offer to stop docker services
141
160
local services_stopped=" false"
142
161
if services_up; then
@@ -241,7 +260,6 @@ function __main__() {
241
260
242
261
read_seed_image_version
243
262
read_image_version
244
- check_retracted_version
245
263
handle_rc_rebranding
246
264
handle_image_upgrade
247
265
0 commit comments