All commands prior to and including pg_isready exit without error, but no matter what I try the next command (CREATE TABLE) hangs. The CircleCI log displays this with no further output:
I was able to replicate your build and once I reached the CREATE TABLE step, I noticed the job running with the following output: Password for user postgres:
Are you also seeing this password input message causing the job to run indefinitely?
Thanks for your response! The password input message is not visible, the CircleCI process indicator just spins with no indication. However – this time I let it time-out, and sure enough there was a password input message. (The process time-out error said something like “no activity for 10min”.)
Thanks for pointing me in the right direction. My question now is should the CircleCI GUI be showing this password request message, or is that expected behavior to show nothing? Being new at this, it stumped me for a while! I’m on Firefox, in case that makes a difference.
(And bonus points, if you have a tip on how to allow the flow to continue non-interactively! Thanks though for figuring out what’s going on)
So glad to hear we’re heading in the right direction!
I was able to see the request for a password in the GUI by clicking on the job while it was running without waiting for our default timeout (which is 10 minutes but can be changed).
To avoid this you can leverage contexts which allows for securing and sharing environment variables. You can create a context by navigating to your organization’s settings.
It is also worth noting you can add environment variables to your project under the project settings. An example of using either looks something like this:
Interesting! I’ve tested Mac Firefox and Chrome but neither show me the output… When I click on “Open step output in new tab”, it looks the same as the step on the job page. When I click “Open raw step output” it displays a blank page… Am I clicking/looking at the wrong spot?
Following up in case any others encounter this: My specific issue was that psql kept going into interactive mode. This occurred for any psql commands – not just password request. I was able to solve the issue for CircleCI by piping my command to cat. For example: