You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--------------------- ERROR -----------------------
Invalid MONGO_VERSION: MONGO_VERSION=5.0
MONGO_VERSION must start with the actual major version of mongo, followed by a dot.
Example: MONGO_IMAGE=my.dockerhub.com/custom-mongo
MONGO_VERSION=6.0-custom
--------------------- ERROR -----------------------
Analysis
a set -x in lib/shared-functions.sh looks (for me) that some variable name/value splitting is not done correctly
overleaf:~/overleaf-toolkit# ./bin/upgrade
Checking for code update...
No code update available for download
New docker image version available (5.1.1)
Current image version is '5.0.6' (from config/version)
Upgrade image? [y/n] y
Upgrading config/version from 5.0.6 to 5.1.1
++ read_configuration MONGO_IMAGE
++ local name=MONGO_IMAGE
++ grep -E '^MONGO_IMAGE=' /root/overleaf-toolkit/config/overleaf.rc
++ sed -r 's/^MONGO_IMAGE=(["'\'']?)(.+)\1$/\2/'
+ local mongo_image=MONGO_IMAGE=mongo
++ read_configuration MONGO_VERSION
++ local name=MONGO_VERSION
++ grep -E '^MONGO_VERSION=' /root/overleaf-toolkit/config/overleaf.rc
++ sed -r 's/^MONGO_VERSION=(["'\'']?)(.+)\1$/\2/'
+ local mongo_version=MONGO_VERSION=5.0
+ '[' -z MONGO_VERSION=5.0 ']'
+ [[ ! MONGO_VERSION=5.0 =~ ^([0-9]+)\.(.+)$ ]]
+ echo '--------------------- ERROR -----------------------'
+ echo ' Invalid MONGO_VERSION: MONGO_VERSION=5.0'
+ echo ''
+ echo ' MONGO_VERSION must start with the actual major version of mongo, followed by a dot.'
+ echo ' Example: MONGO_IMAGE=my.dockerhub.com/custom-mongo'
+ echo ' MONGO_VERSION=6.0-custom'
+ echo '--------------------- ERROR -----------------------'
+ exit 1
I think mongo_version should be 5.0 and not MONGO_VERSION=5.0
The text was updated successfully, but these errors were encountered:
This is indeed a bug that I can confirm.
Changing the lib/shared-functions.sh sed regex syntax in the read_variable() and read_configuration() from "s/^$name=([\"']?)(.+)\1\$/\2/"
to "s/^$name=['\"]?(.*)['\"]?$/\1/"
resolves this issue.
Steps to Reproduce
./bin/upgrade
/config/overleaf.rc
to new split mongo./bin/upgrade
Expected Behaviour
Observed Behaviour
error message
Analysis
a
set -x
inlib/shared-functions.sh
looks (for me) that some variable name/value splitting is not done correctlyI think
mongo_version
should be5.0
and notMONGO_VERSION=5.0
The text was updated successfully, but these errors were encountered: