-
Notifications
You must be signed in to change notification settings - Fork 645
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
Mongo: Change to mongo-scala-driver 4.1.1 #2307
Conversation
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
CLA signed. |
Thank you @mikela for opening this PR. I'm sorry, but it came a little bit too late to make it into Alpakka 2.0 and we don't want to change dependencies within patch releases. |
Sounds good! Thanks! |
Hi @ennru . Any chance this will be released earlier than end of year? I'd like to contribute some extra work on top of this PR, e.g. to add additional overloads of the APIs that take the new Scala-specific classes, which also implement the Reactive Streams APIs, so I can avoid this: Thanks, |
Hi @agemooij, I'm afraid that's unlikely. We'll do the major release when enough things accumulate which would break APIs or include major dependency changes. As we just did Alpakka 2.0 it will take a while. |
Thanks @ennru . I'll try with the non-Scala APIs but still with the 4.x dependencies and see what happens. |
Hi @agemooij, Since this was a very simple PR you could just copy my changes by hand and make your own PR with your changes*. Then, if your PR is accepted, we can just discard this one. You can probably work with v.4.1.0-beta2, it has some nice improvements and it will be come out of beta soon™. *Alternatively you could fork my fork, do a PR there etc, but it's not worth it for just a few lines of code. |
Hi @mikela . For now I've reverted back to using the 1.13.1 version of the reactive driver since any other combination involving the 4.x versions of the driver resulted in API mismatches, either at compile time or at runtime. The thing with the 4.x version of the driver is that they actually have Java and Scala versions of the reactive APIs, so for a future version of the Alpakka driver we can use the Java one for the I'll see if I get around to providing a PR for the above but of course the urgency is gone a little bit if we can't get it released any time soon. |
project/Dependencies.scala
Outdated
@@ -340,8 +340,7 @@ object Dependencies { | |||
|
|||
val MongoDb = Seq( | |||
libraryDependencies ++= Seq( | |||
"org.mongodb" % "mongodb-driver-reactivestreams" % "1.12.0", // ApacheV2 | |||
"org.mongodb.scala" %% "mongo-scala-bson" % "2.7.0" % "test" // ApacheV2 | |||
"org.mongodb.scala" %% "mongo-scala-driver" % "4.1.0" // ApacheV2 |
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.
We are ready for Alpakka 3.0 merges now!
There is a later release of the Mongo driver (4.1.1).
What's the value-add of mongo-scala-driver
compared to mongodb-driver-reactivestreams
and mongo-scala-bson
as used before?
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.
@ennru AFAIK, the main 4.x Java driver lib now has all APIs in the same distribution package. The separate Scala driver, Scala bson, and reactivestreams driver have been discontinued during the release of their 4.x driver.
The main driver page describes that here: https://mongodb.github.io/mongo-java-driver/
It's been a while again now that I looked at the detailed differences but judging from my own comments above the migration process is mostly one of changing the imported packages.
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 old driver has been superseded by the new one. According to the driver compatibility table, only the new driver is compatible with MongoDB 4.4+.
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.
Thank you for this references. Please add them in a comment for later reference.
Please update even the docs page in mongodb.md
with appropriate links to give information about the driver and compatible MongoDB versions.
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.
- Not sure if by add them in a comment you mean here on this PR or somewhere else.
mongodb.md
updated with information about the new driver.
Regarding this doc, I'd remove the Alternative connector section as it is not compatible with MongoDB version 4.4, at least for now. I haven't removed it just in case you want to keep it for other reasons.
Thanks!
The new MongoDB Java Driver is compatible with all MongoDB releases from versions 2.6 to 4.4, unlike the old one, which is not compatible with MongoDB 4.4. |
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.
LGTM.
Thank you! We're ramping up for Alpakka 3 now. |
Any timeline on when Alpakka 3 will be released? My team is struggling with some incompatibility issues related to the outdated Mongo driver |
@robert-blankenship I'm not part of Lightbend so I have no idea but if you need to use the new Mongo driver now you can use a snapshot version of Alpakka, like |
Sorry for the delay, we at Lightbend don't have much time to spend on Alpakka for the time being. I hope the snapshot works for you, we might be able to do a M1. |
Update mongo-scala-driver to latest version (4.0.3)