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

docker image doesn't stop on failed migrations #3520

Closed
Krever opened this issue Dec 12, 2019 · 3 comments
Closed

docker image doesn't stop on failed migrations #3520

Krever opened this issue Dec 12, 2019 · 3 comments

Comments

@Krever
Copy link

Krever commented Dec 12, 2019

When applying migrations fail its reasonable to assume the docker will stop. Such behaviour is critical for production run. Right now if you deploy the application on different environment its almost impossible to spot the failure until the downstream system fails.

Fix is probably very simple, in bash startup script just detect the exit code of migration apply and stop if its !=0. Or add set -e at the top.

@shahidhk
Copy link
Member

@Krever Considering you're talking about the cli-migrations image, the container indeed exits if migration apply fails, see (https://github.com/hasura/graphql-engine/blob/master/scripts/cli-migrations/docker-entrypoint.sh#L3)

Check you Kubernetes/Docker Compose configuration to see if the restart policies are starting it again.

@Krever
Copy link
Author

Krever commented Dec 13, 2019

Hmm, that's weird indeed and I will investigate it further on my end. Thanks and sorry for trouble.

@Krever
Copy link
Author

Krever commented Dec 17, 2019

I cant reproduce it now, sorry for bothering.

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

No branches or pull requests

3 participants