ephemeral-mongo
ephemeral-mongo copied to clipboard
.NET 8.0 CI compatibility
Hi, we're just upgrading our .NET projects to 8.0 and while EphemeralMongo tests still work locally, in the CI pipeline which uses mcr.microsoft.com/dotnet/sdk:8.0 image, it fails with the following error:
Error Message:
#18 69.43 System.TimeoutException : MongoDB connection availability took longer than the specified timeout of 30 seconds. Consider increasing the value of 'ConnectionTimeout'.
#18 69.43 Stack Trace:
#18 69.43 at EphemeralMongo.MongodProcess.StartAndWaitForConnectionReadiness()
#18 69.43 at EphemeralMongo.MongodProcess.Start()
#18 69.43 at EphemeralMongo.MongoRunner.RunInternal()
#18 69.43 at EphemeralMongo.MongoRunner.Run(MongoRunnerOptions options)
Any thoughts on why that could be happening when it worked without issues with .NET 7.0?
After doing some more digging, I found that mongod requires libssl1.1 which is no longer available in dotnet sdk 8.0 image because it has been upgraded to Debian 12 (Bookworm)
Just wanted to say a big thank you @vypsim as I spent about a miserable few hours on this today and I would never have fixed it without your insight.
Hi,
If you don't want to install the libssl1.1 maybe you want to use the EphemeralMongo7.runtime.ubuntu.22.04-x64 package.
But looks like there's an issue in this package that throws a System.IO.FileNotFoundException : Could not find mongod in the following paths: '/runtimes/linux-x64/native/mongodb/bin/mongod'**
I posted a simple workaround to this issue here: https://github.com/asimmon/ephemeral-mongo/issues/48#issuecomment-1855951108
This is what helped me for now https://github.com/Mongo2Go/Mongo2Go/issues/149#issuecomment-1863137835
This is a duplicate of https://github.com/asimmon/ephemeral-mongo/issues/36
Hi,
If you don't want to install the libssl1.1 maybe you want to use the EphemeralMongo7.runtime.ubuntu.22.04-x64 package.
But looks like there's an issue in this package that throws a System.IO.FileNotFoundException : Could not find mongod in the following paths: '/runtimes/linux-x64/native/mongodb/bin/mongod'**
I posted a simple workaround to this issue here: #48 (comment)
while this works, it's only a workaround, I would appreciate a proper fix, maybe one that does not depend on "ubuntu" being used as the only linux distribution.
Would it make sense to go completely to libcrypto.so.3
with the linux-x64
runtime and use and make an Minor version upgrade, as those can introduce breaking changes? I mean ubuntu 18.04 already reached EOL in the last year, is it really worth to support it?
There is currently also the following issue when trying to use the current workaround on > .NET 8 SDK:
warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): ubuntu.22.04-x64. Affected libraries: EphemeralMongo7.runtime.ubuntu.22.04-x64. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details.
Ref: https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1206
This was already mentionen in this Issue: https://github.com/asimmon/ephemeral-mongo/issues/56