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

Piping commands to Redis CLI fails #3186

Open
lcottingham opened this issue Jan 20, 2025 · 0 comments
Open

Piping commands to Redis CLI fails #3186

lcottingham opened this issue Jan 20, 2025 · 0 comments

Comments

@lcottingham
Copy link

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.

@lcottingham lcottingham changed the title Piping to Redis CLI fails in CI Piping commands to Redis CLI fails Jan 20, 2025
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

1 participant