Deffiss / testenvironment-docker

MIT License
117 stars 30 forks source link

downgrade MongoDB.Driver version to 2.4.0 #43

Closed vhatsura closed 3 years ago

vhatsura commented 3 years ago

The lowest referenced library as a dependency, the more use cases where the final library can be used. For this reason, the PR targets to downgrade of MongoDB.Driver to 2.4.0. Luckily, the Mongo team doesn't break the backward compatibility of the public API every release, which allows targeting the lowest version. E.g., NEST has broken public APIs between minor versions (#27 as an example).

I know that introducing such a statement means that all libraries need to be revised, but for me, at least for now, MongoDB is more crucial.

Deffiss commented 3 years ago

Sounds reasonable. @Hellevar what do you think?

Hellevar commented 3 years ago

Please describe your problem with different libraries versions and we'll try to help you. I'm not sure that downgrading client version on our side is the best choice.

vhatsura commented 3 years ago

Please describe your problem with different libraries versions and we'll try to help you. I'm not sure that downgrading client version on our side is the best choice.

I'm a maintainer of one of the library where I need to test functionality against various versions of MongoDB starting from 2.4.x. There is no possibility to use TestEnvironment.Docker.Containers.Mongo because of the package downgrade issue.

In addition, from a support perspective, it's better to have the minimum versions in dependencies which allow using a library for more projects which don't want or cannot upgrade their dependencies.

Hellevar commented 3 years ago

But what about support of new MongoDB versions? According to this https://docs.mongodb.com/drivers/csharp/#mongodb-compatibility MongoDB.Driver 2.4.0 supports MongoDB version only up to 3.4(while latest is 4.4)

Deffiss commented 3 years ago

According to compatibility table, @Hellevar is right. But tests are passing successfully for mongo:4.0 according to build logs. I am not expert in .NET Core versioning, from my perspective if we can reference higher versions of Mongo DB driver without any issues on application layer, I guess that's fine to downgrade.

vhatsura commented 3 years ago

But what about support of new MongoDB versions? According to this https://docs.mongodb.com/drivers/csharp/#mongodb-compatibility MongoDB.Driver 2.4.0 supports MongoDB version only up to 3.4(while latest is 4.4)

According to the guide on MongoDB Compatibility Tables:

The check marks (✓) indicate that the driver can access all the features of that specific version of MongoDB server unless those features have been deprecated or removed.

It means that the old MongoDB driver version cannot access new features, however, still can work with the newest versions of the database. Also, the applications, libraries which use the TestEnvironment.Docker.Containers.Mongo package can upgrade the MongoDB driver to the latest version w/o any issues

Hellevar commented 3 years ago

Okay, no more comments from my side. Please bump mongo container package version and it can be merged

Deffiss commented 3 years ago

Deployed