Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.6k stars 432 forks source link

Error after connecting BitBucket $pushAll is depreciated #1059

Closed hongkongkiwi closed 6 years ago

hongkongkiwi commented 6 years ago

Hi,

When using Strider from a docker and trying to connect BitBucket (after pushing allow) I receive this error:

Looks like strider is using $pushAll which is now depreciated and removed from the latest mongodb. Any workaround or fixes?

Connect
500 MongoError: Unknown modifier: $pushAll
   at Function.MongoError.create (/data/node_modules/mongoose/node_modules/mongodb-core/lib/error.js:31:11)
   at toError (/data/node_modules/mongoose/node_modules/mongodb/lib/utils.js:139:22)
   at /data/node_modules/mongoose/node_modules/mongodb/lib/collection.js:1059:67
   at /data/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:469:18
   at process._tickCallback (internal/process/next_tick.js:176:11)

After some research I find that this issue is caused by Mongoose and fixed by upgrading mongoose to version 5 or later. Can we get the package.json updated?

xgalen commented 6 years ago

As described here, not only changing the version is enough, the code has to be migrated too. A pull-request is welcome :)

knownasilya commented 6 years ago

So they changed v4 in a breaking way? Or is v5 being installed when it shouldn't be?

knownasilya commented 6 years ago

@hongkongkiwi what version is in /data/node_modules/mongoose/node_modules/mongodb/package.json?

guruparan commented 6 years ago

I had the same issue and i tried with latest version 5.2.6 and it worked fine

knownasilya commented 6 years ago

Latest of mongoose?

guruparan commented 6 years ago

Yes mongoose 5.2.6

knownasilya commented 6 years ago

I've released v1.10.1 to use mongoose v5. This uses the new db_uri format, i.e. you need to specify a port now. The db_uri has been updated.