Skip to content

Fix dump command #139

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

Merged
merged 2 commits into from
Sep 4, 2019
Merged

Fix dump command #139

merged 2 commits into from
Sep 4, 2019

Conversation

gabor-boros
Copy link
Member

Reason for the change
#137

Description
As it turned out, all the commands receiving the parameters like sys.argv[1:] except the dump command. Because of this, the command ignored the first parameter which is usually the --connect so the users were not able to connect to their RethinkDB servers.

Note
This PR also contains some adjustments for pytest's config. The Unit/integration tests are missing right now for all the commands, but we will need to include them later.

Code examples
Run the script as a python script
python -m rethinkdb dump -c localhost:28015

Run the script as an installed script
rethinkdb-dump -c localhost:28015

References
Related issues in the past:

@alexa-infra
Copy link
Contributor

@gabor-boros it seems to be a clean solution for rethinkd-dump bug #137. I have tested briefly rethinkdb-dump <args> and python -m rethinkdb dump <args> command invocations with your changes and they don't skip the first parameter now. import/export and other commands seem to be good too.

IMO command line parser needs a general refactoring: optparse is deprecated and has to be replaced by argparse, some argument help-texts are missing/outdated, etc.

@gabor-boros
Copy link
Member Author

I totally agree with you to replace optparse but did now wanted to include that change here. I’ll merge this PR and create a post release to resolve the issue.

In the future we will need tests for these scripts and also we need to replace optparse

@gabor-boros gabor-boros merged commit 8f36106 into master Sep 4, 2019
@gabor-boros gabor-boros deleted the fix-dump-command branch September 4, 2019 05:28
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