Database options connect fix#8470
Closed
omairvaiyani wants to merge 2 commits intoparse-community:alphafrom
Closed
Database options connect fix#8470omairvaiyani wants to merge 2 commits intoparse-community:alphafrom
omairvaiyani wants to merge 2 commits intoparse-community:alphafrom
Conversation
Thanks for opening this pull request! |
4 tasks
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #8470 +/- ##
==========================================
- Coverage 94.30% 93.96% -0.35%
==========================================
Files 183 183
Lines 14484 14504 +20
==========================================
- Hits 13659 13628 -31
- Misses 825 876 +51
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
1 task
Member
|
Closed via #8467 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes: #8466
A new set of Parse Config options were added in v6 to
databaseOptionscalled enableSchemaHooks and schemaCacheTtl. However, these options are not strictly speaking database options, they instead manage Parse's internal behaviour with relation to the database. This means that MongoDB doesn't recognise these options and so, they must not be passed into the MongoDB client constructor.This was correctly handled in the MongoStorageAdapter where the new, non-mongodb options are deleted - Screenshot 1 before they're used as MongoDB client options.
However, there remains another area where the unsupported options are passed to a MongoDB client. You can see in Screenshot 2 that
_mongoOptionsis used directly when connecting to the MongoDB client in the GridFSBucketAdapter.This is where an error is thrown (screenshots 3 and 4) if a Parse Server uses the new
enableSchemaHooksorschemaCacheTtloptions.Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4
