Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor load_mongodump.sh script #150
Refactor load_mongodump.sh script #150
Changes from 9 commits
6a46d8e
df28c81
20a2c6f
3a156c1
f36706a
00e0347
79618e8
960b449
9b90990
1da7854
82dfe2e
ce28e3e
8d25f43
fea748b
458e0f8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be helpful to make these same changes in
docker-compose.yml
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent of using
load_mongodump.sh
is to load the dataset into mongo db.A couple of observations:
load_mongodump.sh
from docker-compose.dev.yml.CONFIG_FILE="$SCRIPT_DIR/../../docker-compose.dev.yml"
load_mongodump.sh
if we want to configure for bothdocker-compose.yml
anddocker-compose.dev.yml
.Please let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought was that the updated default with the formatting might make it easier to switch that dataset in use when editing the docker file (ie update from
mongodb://db/DB_NAME
tomongodb://db/openpath_prod_open_acess
instead of fromdb
, but it sounds like there are more technical reasons that differ between the two files, so I'm ok with leaving the other dockerfile aloneThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, users don't need to rename
DB_HOST=mongodb://db/DB_NAME
manually; the script edits the file directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting back to
DB_HOST=db
such that it's consistent betweendocker-compose.dev.yml
anddocker-compose.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I don't understand why you reverted this change. I am also not sure how it works, given that
load_mongodump.sh
expects amongodb://
URL so that it can change theDB_NAME
appropriately, I bet that this was not tested, because I don't see how it could work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have documented my testing below #150 (comment)
In the
load_mongodump.sh
:I understand, it would assign
mongdb://db$DB_NAME
to the configuration file.I have also re-done testing and updated detailed logs below. #150 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should be two levels up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this since it contradicts the README instructions. I know it was in the original PR, but was removed in response to review feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iantei the entire if check does not contradict the README, only the last
echo
. I will fix this before merging so that we don't have to wait for yet another round of reviews.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have re-introduced the check while removing the last
echo
statement.