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

Invalid version reported for version strings ending in -latest #841

Closed
DABH opened this issue Jan 4, 2024 · 2 comments
Closed

Invalid version reported for version strings ending in -latest #841

DABH opened this issue Jan 4, 2024 · 2 comments
Labels
bug released Pull Request released | Issue is fixed

Comments

@DABH
Copy link

DABH commented Jan 4, 2024

Versions

  • NodeJS: 16, 18, 20
  • mongodb-memory-server-*: 9.1.3
  • mongodb(the binary version): 0.0.0
  • mongodb(the js package): 0.0.0
  • mongoose: 0.0.0
  • system: Ubuntu 22.04 LTS

package: mongo-memory-server(-core)

What is the Problem?

My CI pipeline refers to MongoDB versions like "v6.0-latest". This worked with mongodb-memory-server(-core) 8.x, but it seems like it no longer works in 9.x (9.1.3, at least).

Code Example

Here's where we define the MongoDB version strings in our repo, for our CI pipeline: https://github.com/winstonjs/winston-mongodb/blob/master/.github/workflows/ci.yml

Debug Output

Please see the GitHub Actions output here: winstonjs/winston-mongodb#259

Do you know why it happens?

No, but my guess is it may be something similar to #734, where some code maybe slipped in between 8.x and 9.x that adds some semver comparison that doesn't sanitize for -latest?

Thanks so much for helping track this down, let me know if there's any other info you need from me!

@DABH DABH added the bug label Jan 4, 2024
@hasezoey
Copy link
Member

hasezoey commented Jan 4, 2024

thanks for reporting, issue is quite obvious: v6.0-latest is not a valid semver version and was not coerced to one beforehand, and since 9.0 there are checks against the version to decide the default storage-engine to use, because mongodb 7.0 removed the ephermeralForTest(in-memory) engine, which is faster than wiredTiger and so is still used as a default for lower versions

Copy link

github-actions bot commented Jan 4, 2024

@github-actions github-actions bot added the released Pull Request released | Issue is fixed label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug released Pull Request released | Issue is fixed
Projects
None yet
Development

No branches or pull requests

2 participants