Piping commands to Redis CLI fails
Piping a FLUSHALL and QUIT command to the redis:cli is returning a No Redis instances found error.
This one is a new issue that has emerged at some point within the last 4 days with no CI code changes on my side.
I managed to replicate this in both CI and local environments.
Heroku cli version heroku/10.0.2 darwin-x64 node-v2017.0
CLI commands
cat ./build/flushall | heroku redis:cli --app my-app-name --confirm my-app-name
The flushall file (stored in ./build)
FLUSHALL
QUIT
Output: Error: No Redis instances found
echo "FLUSHALL\r\nQUIT" | heroku redis:cli --app my-app-name --confirm my-app-name
Output: Error: No Redis instances found
heroku redis:cli --app my-app-name --confirm my-app-name
Output: The expected redis prompt - but no commands to run.
I have confirmed the state and presence of the redis addon instance prior to these commands with:
heroku addons --app my-app-name
Current Workaround
expect -c '
spawn heroku redis:cli --app my-app-name --confirm my-app-name
expect ">"
send "FLUSHALL\r"
expect ">"
send "QUIT\r"
expect eof'
It seems that a recent change means that piping a command to the redis cli is causing heroku to lose reference to the REDIS instance.
Thank you for reporting, I was able to reproduce this. We will get the fix prioritized.
Do we know if this has been fixed/addressed yet?
@lcottingham I apologize for the delay on this. I have merged a fix and it will be released next week.