Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

jyemin
Copy link

@jyemin jyemin commented Feb 27, 2025

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:

  • Mention the appropriate issue in your description (for example: 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, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

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)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions bot added the build label Feb 27, 2025
@jyemin jyemin changed the title Update MongodB driver to mongodb-driver-legacy:5.3.1 Update MongoDB driver to mongodb-driver-legacy:5.3.1 Feb 27, 2025
@@ -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",
Copy link
Author

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.

Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@@ -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());
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant