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

fix: set ON_ERROR_STOP=1 for psql, so calling scripts get an exit status #325

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

erickedji
Copy link
Contributor

Currently, using postgres:connect with a script passed in through stdin, there is no way to know if the script failed or not.

This change aligns the behavior with https://github.com/docker-library/postgres/blob/eaa1c35769621a6bb1e499073a5812ba478c7688/docker-entrypoint.sh#L196 which returns an exit status.

Currently, using `postgres:connect` with a script passed in through stdin, there is no way to know if the script failed or not.

This change aligns the behavior with https://github.com/docker-library/postgres/blob/eaa1c35769621a6bb1e499073a5812ba478c7688/docker-entrypoint.sh#L196 which returns an exit status.
@erickedji
Copy link
Contributor Author

First unit test failed with text file busy, doesn't seem linked to the PR:

not ok 1 (postgres:hook:pre-delete) removes app from links file when destroying app # in 1683 ms
# (from function `setup' in test file hook_pre_delete.bats, line 5)
#   `dokku apps:create my-app' failed
# -----> Creating my-app...
# 2024/09/24 10:10:00 open /home/dokku/.basher/bash: text file busy1
#  !     2024/09/24 10:10:00 open /home/dokku/.basher/bash: text file busy1
# 
#  !     Postgres service ls does not exist
#  !     Postgres service ls does not exist
# -----> Destroying my-app (including all add-ons)
# -----> Cleaning up...
# -----> Retiring old containers and images

@josegonzalez
Copy link
Member

Transient error, merging :)

@josegonzalez josegonzalez merged commit 29057e0 into dokku:master Sep 24, 2024
2 checks passed
@erickedji erickedji deleted the patch-1 branch September 25, 2024 22:40
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

Successfully merging this pull request may close these issues.

2 participants