Repository navigation
Releases
Releases · asimmon/ephemeral-mongo
3.3.0
What's Changed
- Added support for MongoDB 9 with
MongoVersion.V9. - Added support for Windows on ARM64. MongoDB only publishes x64 builds for Windows, so they run through Windows 11's x64 emulation.
EphemeralMongonow requires MongoDB C# driver 3.9.0 or later, which no longer pulls vulnerable versions of SharpCompress and Snappier.- Downloaded archives, extracted binaries, temporary files and default data directories now live in the per-user local app data directory on every platform, instead of shared temp directories like
/tmp. On Unix, that directory is restricted to its owner. - Versions and archive URLs from the MongoDB release documents are validated before use. Archives must be
.zipor.tgzfiles downloaded over HTTPS from mongodb.org. - More reliable binary downloads:
- Parallel test assemblies take turns through a cross-process lock instead of downloading the same archive several times.
- Temporary HTTP failures (network errors, 408, 429 and 5xx) are retried with backoff, and a download that stalls for 60 seconds is aborted.
- The release information (
current.jsonandrelease.json) is cached on disk forNewVersionCheckTimeoutand shared by all processes. When the download servers fail, the cached copy is used with a warning.
- Retry starting
mongodon another port when its port is already taken. - Rewrote
MongoRunnerPoolto be safe under concurrent use. Retired runners are stopped only once all their rentals are returned, failed startups are never handed out again, idle runners expire, and disposing the pool aborts pending startups. mongoimportandmongoexportfailures now throw anEphemeralMongoExceptionthat includes the command line and the tool's output, instead of going unnoticed.- Disposing a process that failed to start no longer hides the original startup exception.
- Data directory cleanup skips directories still in use by a running
mongod. - Fixed a few bugs:
- Tar extraction could hang on a full output pipe. Errors now include tar's output.
- Cancelling a wait on the cross-process mutex didn't release it.
- The replica set's driver cluster kept monitoring in the background after the runner stopped.
MongoRunnerOptionsnow accepts null directories, and a nullDataDirectoryLifetimeturns cleanup off.- MongoDB versions are matched on
<major>.instead of<major>. - Binaries are copied through a temporary file and renamed, so other processes never see a half-copied file.
- NuGet packages are now attached to GitHub releases.
Pull Requests
- chore(deps): update nuget dependencies (major) by @asimmon in #101
- chore(deps): update actions/checkout action to v5 by @asimmon in #112
- chore(deps): update dependency dotnet-sdk to v9.0.304 by @asimmon in #110
- chore(deps): update nuget dependencies by @asimmon in #109
- Update to .NET 10 SDK, C# 14 and latest packages by @asimmon in #123
- Make CI, releases and binary downloads more reliable by @asimmon in #124
- Fix tar extraction, mutex, replica set and options bugs by @asimmon in #125
- Don't delete data directories in use by a running mongod by @asimmon in #126
- Use per-user directories instead of /tmp on Linux by @asimmon in #127
- Throw when mongoimport or mongoexport fails by @asimmon in #128
- Keep the original startup error when disposing a mongo process by @asimmon in #129
- Rewrite MongoRunnerPool by @asimmon in #130
- Add support for MongoDB 9 by @asimmon in #131
- Support Windows on ARM64 by @asimmon in #132
- Update GitHub Actions to their latest major versions by @asimmon in #133
- Keep files out of shared temp directories and harden CI against supply chain attacks by @asimmon in #134
- Driver updates and vulnerability scan by @asimmon in #135
- Fix the vulnerability scan report path in CI by @asimmon in #136
- Cache MongoDB release information shared across processes by @asimmon in #137
- Release on demand and tag only after publishing by @asimmon in #138
- Attach the packages to GitHub releases by @asimmon in #139
- Update the README for 3.3.0 by @asimmon in #140
- Ignore data directories deleted during cleanup by @asimmon in #141
Full Changelog: 3.2.0...3.3.0
3.2.0
What's Changed
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.6 by @asimmon in #95
- chore(deps): update nuget dependencies by @asimmon in #96
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.7 by @asimmon in #97
- chore(deps): update dependency dotnet-sdk to v9.0.300 by @asimmon in #99
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.8 by @asimmon in #98
- Update runners by @asimmon in #106
- fix: ensure user-provided binary directory returns executable path by @asimmon in #107
- Add support for .NET Framework by @asimmon in #108
- chore(deps): update dependency dotnet-sdk to v9.0.301 by @asimmon in #104
- chore(deps): update nuget dependencies by @asimmon in #102
Full Changelog: 3.1.0...3.2.0
3.1.0
What's Changed
- Improved the message of exceptions thrown at startup:
- Include the full process path and arguments.
- Include error and fatal structured log messages from
mongod. - Include content from standard error, and sometimes standard output(e.g., when invalid arguments are passed to
mongod, the error goes to stdout).
- Throw a new
EphemeralMongoExceptiontype for unexpected behavior, like error when downloading the binaries or error when starting processes. This is mostly to replace the overusedInvalidOperationException. Other built-in exceptions, likeArgumentException,TimeoutException, andNotSupportedException, remain used for specific use cases. - Use UTF-8 for process standard output and error.
- Check if mongod if already executable to skip doing
chmod +x. - Retry
Process.Startwhen an exception happens with text file busy. - Retry updating the update check file when downloading binaries.
Pull Requests
- Improve troubleshooting experience on unexpected process exit by @asimmon in #88
- An attempt to reduce flakiness by @asimmon in #89
- Make Windows CI less flaky by reducing the amount of tests to a minimum by @asimmon in #92
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.3 by @asimmon in #71
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.4 by @asimmon in #87
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.5 by @asimmon in #90
- chore(deps): update dependency gitversion.msbuild to 6.3.0 by @asimmon in #94
Full Changelog: 3.0.0...3.1.0
3.0.0
TL;DR: Packages EphemeralMongo.Core, EphemeralMongo6, EphemeralMongo7, EphemeralMongo8, and their runtime-specific equivalents are now replaced by a single package: EphemeralMongo for the MongoDB C# v3.x driver and EphemeralMongo.v2 for the v2.x driver. MongoDB binaries are downloaded at runtime with automatic support for all operating systems, CPU architectures, and editions.
What's new
EphemeralMongosupports MongoDB C# driver v3.x.EphemeralMongo.v2is available for driver v2.x users.- MongoDB binaries are fetched at runtime as needed.
- Custom binaries can still be supplied.
- You can specify MongoDB version and edition.
- Downloaded binaries are cached in a centralized, user-specific location.
- The HTTP transport can be customized for authentication or proxies.
- APIs are async-first, with sync alternatives and cancellation token support.
- MongoDB Enterprise users can leverage the in-memory storage engine for faster tests.
- Breaking changes include options like MongoDB arguments becoming a string array.
- Package size is significantly reduced.
- Maintenance is easier, and contributions are more accessible.
- Includes an experimental
MongoRunnerPoolfor sharing runners across tests. - Read more here #80
Pull requests
- Pre-3.0.0 rehaul by @asimmon in #73
- Move C# code under the non-v2 projects by @asimmon in #77
- Ubuntu 24.04 support for MongoDB 6 and 7 by @asimmon in #78
- More work for 3.0.0 by @asimmon in #79
- Public API adjustment for 3.0.0 by @asimmon in #81
- Release on any tag by @asimmon in #82
- Add bug report template by @asimmon in #83
- Added pooled mongo runner and cancellation token support for synchronous methods by @asimmon in #85
- Update MongoRunnerPool and documentation by @asimmon in #86
Full Changelog: 2.0.0...3.0.0
2.0.0
What's Changed
- Breaking change: Support for MongoDB 5.0 and 6.0 has been removed, as their end-of-life has passed.
- Breaking change: arm64 is now the default target for macOS. The previous target was x64.
- Breaking change: The Linux runtime package now uses Ubuntu 22.04's MongoDB binaries instead of the 18.04 ones. OpenSSL 3.0 is now required.
- Breaking change: Updated the MongoDB C# driver to 2.28.0, which now uses strong-named assemblies.
- Added support for MongoDB 8.0.
- Introduced data directory management to delete old data directories automatically.
- Use direct connection in replica set connection strings.
- Fixed the spelling issue in
MongoRunnerOptions.StandardOutputLogger.
Pull requests:
- Improve codebase with several changes and enhancements by @asimmon in #66
- chore(deps): update dependency system.memory to 4.6.2 by @asimmon in #44
- Support arm64 for macOS instead of x64 by @asimmon in #67
- chore(deps): update dependency workleap.dotnet.codingstandards to 1.1.1 by @asimmon in #68
- Update README, coding style rules, prepare for upcoming release by @asimmon in #69
Full Changelog: 1.1.3...2.0.0
1.1.3
1.1.2
1.1.1
What's Changed
- Testing and .NET SDK dependencies upgrade on Windows by @asimmon in #37
- Disabled macOS job because of recent GitHub agent updates (still validating executables integrity)
- Updated current MongoDB versions by @asimmon in #38
- MongoDB
4.4.19to4.4.22 - MongoDB
5.0.15to5.0.18 - MongoDB
6.0.4to6.0.7
- MongoDB
Full Changelog: 1.1.0...1.1.1
1.1.0
What's Changed
- Bump MongoDB.Driver from 2.12.0 to 2.19.0 in /src/EphemeralMongo.Core by @dependabot in #23
- Added Semgrep code analysis and Renovate workflows by @asimmon in #26
- chore(deps): update pipeline dependencies (major) by @asimmon in #29
- chore(deps): update nuget dependencies by @asimmon in #27
- chore(deps): update dependency cake.frosting to v3 by @asimmon in #28
- Ensure MongoDB child processes are killed when current process is prematurely killed by @asimmon in #25
- Updated README by @asimmon in #30
New Contributors
- @dependabot made their first contribution in #23
Full Changelog: 1.0.0...1.1.0
1.0.0
What's Changed
- Update shields.io badge url in README.md by @evan-cohen in #17
- Update MongoDB to latest community versions available by @asimmon in #19
- MongoDB
4.4.17to4.4.18 - MongoDB
5.0.13to5.0.14 - MongoDB
6.0.2to6.0.4
- MongoDB
- Update README.md by @asimmon in #20 and #21
New Contributors
- @evan-cohen made their first contribution in #17
Full Changelog: 0.1.3...1.0.0