Skip to content

Add Bash 4 note for database-upgrade script

Wei-Meng Lee requested to merge weimeng-master-patch-69586 into master

While testing the upgrade to the 3.0.0 chart, I ran into the following issue:

➜ curl -s https://gitlab.com/gitlab-org/charts/gitlab/raw/v3.0.0/scripts/database-upgrade | bash -s post
bash: line 47: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

A little bit of searching reveals that we need at least Bash 4.0 to use associative arrays and the default bash on macOS is 3.2. Once I installed bash using Homebrew I managed to get the script to run.

This merge request adds a note stating that Bash 4 is a requirement to run the post database-upgrade script.

Merge request reports