LandRover / StaffjoyV2

Staffjoy V2 - all microservices in a monorepo
MIT License
141 stars 53 forks source link

Unbound variable error during "make dev-build" #20

Open Perkinje opened 1 year ago

Perkinje commented 1 year ago

We use Github to track bugs in Staffjoy. Please answer these questions before submitting your issue. All of our code is in one place, so please preface the title with the system where the bug is (e.g. "company api" or "www"). Thanks!

What environment did you encounter the issue in?

Development

What did you do?

After vagrant up and vagrant ssh I went into $STAFFJOY and ran "make dev-build". This returned an error during the db migration because of an unbound variable associated with $ACCOUN_MYSQL_CONFIG (from this line in ci/dev-build.sh migrate -database=${ACCOUNT_MYSQL_CONFIG} -path=${STAFFJOY}/account/migrations/ up).

What did you expect to see?

No errors

What did you see instead?

vagrant@staffjoy-v2:~/golang/src/v2.staffjoy.com$ make dev-build
make clean 
make[1]: Entering directory '/home/vagrant/golang/src/v2.staffjoy.com'
rm -rf vendor/
make[1]: Leaving directory '/home/vagrant/golang/src/v2.staffjoy.com'
bash ci/build.sh
bash ci/dev-build.sh
++ date +%s
+ VERSION=dev-1673238010
+ NAMESPACE=development
+ targets=('www' 'faraday' 'account/api' 'account/server' 'email/server' 'myaccount' 'whoami' 'company/server' 'company/api' 'ical' 'superpowers' 'sms/server' 'bot/server' 'app')
+ declare -a targets
+ echo 'Running database migration'
Running database migration
ci/dev-build.sh: line 14: ACCOUNT_MYSQL_CONFIG: unbound variable
make: *** [makefile:48: dev-build] Error 1
LandRover commented 1 year ago

Hey, Is mysql running?

Can you please run ./vagrant/mysql.sh first? just to make sure.

codelin-dc commented 8 months ago

I have the same issue. after running mysql.sh i get: ERROR 1007 (HY000) at line 1: Can't create database 'account'; database exists