tryvium-travels/memongo

Does not work with CircleCI/Github actions?

Closed this issue · 2 comments

When running on github actions I'm getting the following errors. Is this a limitation of memongo?

[memongo] [INFO]  Starting MongoDB with options &memongo.Options{ShouldUseReplica:false, Port:46361, CachePath:"/home/runner/.cache/memongo", MongoVersion:"4.0.5", DownloadURL:"https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.0.5.tgz", MongodBin:"", Logger:(*log.Logger)(nil), LogLevel:0, StartupTimeout:10000000000, Auth:false}
[83](https://github.com/myproject/server-go/runs/8247274161?check_suite_focus=true#step:5:84)
[memongo] [INFO]  mongod from https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.0.5.tgz does not exist in cache, downloading to /home/runner/.cache/memongo/mongodb-linux-x86_64-ubuntu2004-4_0_5_tgz_29b99839f9/mongod
[84](https://github.com/myproject/server-go/runs/8247274161?check_suite_focus=true#step:5:85)
{"level":"fatal","error":"error intializing gzip reader from /tmp/987266152: gzip: invalid header","time":"2022-09-08T10:39:18Z","message":"error intializing gzip reader from /tmp/987266152: gzip: invalid header"}

Check the support for the various mongo versions

The GitHub actions runner usually is on ubuntu-latest and minimum supported version should be > 4.2.1 (i do not remember exactly)
If it does not break your requirements, try using a version > 5.0.0

You can double check anytime by browsing through the test files of the project.

Please let me know if you have solved, otherwise I will assist you through other alternatives (we use gh actions internally with memongo and mongo5.0.0 without issues)

thank u @saniales , in deed, 5.0.0 works on github actions and circleci, didn't think it would be related to ubuntu-latest.