Unexpected flag `--confirm` when restoring to remote environment
carlosramireziii opened this issue · 4 comments
Hi there!
When running the staging restore development
command from my Linux machine, I receive the following error:
I just installed the latest version of Parity using the "On Debian" instructions.
Here is the result of heroku --version
:
heroku-toolbelt/3.43.16 (x86_64-linux) ruby/2.3.3
heroku-cli/5.9.0-1b8deac (linux-amd64) go1.7.5
The error message seems to be indicating that the --confirm
flag is no longer supported, but I can't find any information about that in the Heroku documentation or otherwise. Not sure if maybe I have an old version of the toolbelt installed.
Has anyone else run into this?
Hi, I suspect that the Heroku CLI has changed its behavior with regard to the --confirm
switch. We had a similar issue in #122 when unrecognized arguments started raising errors.
We should do a PR to fix this in a similar fashion to #122 once we've confirmed what the proper way to pre-confirm the database overwrite is from the Heroku CLI docs.
Got it! Makes sense, thanks for the quick response.
Perhaps --confirm
is no longer needed because the heroku pg:push
operation won't happen unless the remote DB is already empty?
For example, when I initially tried pushing my development database to the remote DB, Heroku prevented it saying Remote database is not empty. Please create a new database or use heroku pg:reset
.
When I ran heroku pg:reset -r staging
, I was asked to confirm or re-run the command with the --confirm
flag.
After reseting the DB, I ran the original heroku pg:push
command and it ran immediately without requiring a manual confirmation or a --confirm
flag.
So it appears that pg:push
only works on a clean database and the confirmation step only applies if you are reseting an existing DB using pg:reset
.
Thanks for the research. We may want to make the pg:reset
with --confirm
part of the staging restore action.
I will be able to do a PR for this later in the week and ship a new parity version with the fix. (If you want to tackle the PR yourself I'd be happy to review it.)
Apologies for the delayed response.. I think you'll be able to get to a PR for this sooner than I will so please go ahead.
Thanks again for the fast response and turnaround on this!