-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update MongoDB driver to mongodb-driver-legacy:5.3.1 #34100
base: master
Are you sure you want to change the base?
Conversation
@@ -839,7 +839,7 @@ class BeamModulePlugin implements Plugin<Project> { | |||
log4j2_slf4j_impl : "org.apache.logging.log4j:log4j-slf4j-impl:$log4j2_version", | |||
mockito_core : "org.mockito:mockito-core:3.7.7", | |||
mockito_inline : "org.mockito:mockito-inline:4.5.1", | |||
mongo_java_driver : "org.mongodb:mongo-java-driver:3.12.11", | |||
mongo_java_driver : "org.mongodb:mongodb-driver-legacy:5.3.1", |
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.
To minimize the changes, I left the name of the library as is, but happy to change it to mongodb-driver-legacy
if that makes sense.
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
@@ -380,7 +380,7 @@ protected static class BoundedGridFSSource extends BoundedSource<ObjectId> { | |||
|
|||
private DBCursor createCursor(GridFS gridfs) { | |||
if (spec.filter() != null) { | |||
DBObject query = (DBObject) JSON.parse(spec.filter()); | |||
DBObject query = BasicDBObject.parse(spec.filter()); |
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 Extended JSON syntax accepted by BasicDBObject#parse
is mostly consistent with the syntax accepted by JSON#parse
. To understand whether this might cause compatibility issues, can anyone point me to how spec.filter()
is initialized? Does the filter come from the application or is it generated by the framework, and if the later, where in the code does that happen?
Upgrade MongoDB Driver to latest available release.
Note that as of 4.0 the mongo-java-driver uber jar is no longer published, so using mongodb-driver-legacy (which will pull in transitive dependencies) in its place.
I'll also note that I wasn't able to build the project locally without errors so I'm using the PR to check whether everything still works.
#32088
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.