Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Perkinje opened this issue Jan 9, 2023 · 2 comments
Open

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

Perkinje opened this issue Jan 9, 2023 · 2 comments

Comments

@Perkinje
Copy link

Perkinje commented Jan 9, 2023

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
Copy link
Owner

Hey,
Is mysql running?

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

@codelin-dc
Copy link

codelin-dc commented Nov 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants