amazon-documentdb-tools icon indicating copy to clipboard operation
amazon-documentdb-tools copied to clipboard

Accept database override as a parameter

Open shekelator opened this issue 2 years ago • 1 comments

Issue #, if available: No issue filed at this time.

Description of changes: We are using the index dump tool, and would like to constrain it to a single Mongo database. This adds a command-line parameter to set the database.

I'm new to contributing to open source, and not very experienced with Python, so your forbearance is appreciated! The tests give the same output before and after the change, so I'm going to treat that as a pass. Hope that's ok!

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

shekelator avatar Mar 18 '22 15:03 shekelator

  • Undo changes to existing code that you are not changing in your PR, it appears that you've combined two lines into one a few times. This makes it harder for the reviewer to see your actual code changes.
  • change new parameter to --include-databases
  • new parameter should be comma separated list of databases to include, or just a single database
  • convert this parameter into a list of database names or empty list if the argument was not supplied
  • just after line 252 - if database name found is not in the database include list and the database include list is not empty, simply "continue"

Thanks for the feedback. I think I've addressed them all, let me know how it looks.

shekelator avatar Mar 18 '22 21:03 shekelator