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

feat(mongo): Update mongo driver to v3 #413

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

ChrisMcKee
Copy link
Contributor

  • Ephemeral mongo won't work with the v3 driver and mongo2go fails.
  • Replaced with Testcontainers.MongoDb
  • Removed unused usings
  • Dropped netstandard 2.0 as mongo 3.0 removed target; it does support net472 but would require library to be built on windows agent
  • Update actions versions

Tests pass bar the MongoWatcherFacts; literally no idea what that's supposed to be testing.
Watching the mongo db the data written in the test is committed.

image

I'd say this is a breaking change as Mongo v3 drops support for netstandard2.0
They have kept net472 but that would probably require some fettling with the github actions. For now I've simply set the target for either

<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net472;netstandard2.1;net6.0;net8.0</TargetFrameworks>

* Ephemeral mongo won't work with the v3 driver and mongo2go fails.
* Replaced with Testcontainers.MongoDb
* Removed unused usings
* Dropped netstandard 2.0 as mongo 3.0 removed target; it does support net472 but would require library to be built on windows agent
* Update actions versions
@gottscj
Copy link
Owner

gottscj commented Oct 20, 2024

Thanks! I will take a look.

MongoJobWatcher observes the changeStream, when jobs are enqueued. It requires replica sets. Im guessing the test container is a single node.

@acorbin-vdm
Copy link

Hello,
waiting for this PR :)
Thanks in advance,
Adrien

Copy link
Owner

@gottscj gottscj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gottscj gottscj merged commit 5823ca5 into gottscj:master Oct 28, 2024
1 check failed
@gottscj
Copy link
Owner

gottscj commented Oct 28, 2024

I merged it to master branch. I will release, when I got the last test running using testcontainers.

Thanks!!

@acorbin-vdm
Copy link

Hi,
Appears there is one test which did not passed. The build wasn't complete so.
Could you take a look if you have the time?
Thanks a lot in advance,
@

@gottscj
Copy link
Owner

gottscj commented Oct 30, 2024

Released v1.11.0 Thanks @ChrisMcKee!

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

Successfully merging this pull request may close these issues.

3 participants