liquibase-mongodb icon indicating copy to clipboard operation
liquibase-mongodb copied to clipboard

Liquibase throws an error when running on Azure (Cosmos DB API for MongoDB)

Open jjpinto opened this issue 3 years ago • 5 comments

A show stopper has been found when running Liquibase on Azure using Cosmos DB API for MongoDB. The extension works properly local dev environment but when we run on Azure it does not go well.

More details:  https://docs.microsoft.com/en-us/azure/cosmos-db/mongodb/feature-support-36#administration-commands

Error found: com.mongodb.MongoCommandException: Command failed with error 115 (CommandNotSupported): 'Command collMod not supported.' on server xxx.mongo.cosmos.azure.com:10255. The full response is {"ok": 0.0, "errmsg": "Command collMod not supported.", "code": 115, "codeName": "CommandNotSupported"}

How can we bypass this problem? It would be nice to have a Liquibase extension to use another way to implement the migration.

jjpinto avatar Feb 19 '22 15:02 jjpinto

We are facing the same issue. Did you find any workaround ?

Nico-Chl avatar Sep 14 '22 07:09 Nico-Chl

No @Nico-Chl , we had to stop with that for the moment until a fix was provided for colMod (Administration commands)

jjpinto avatar Sep 14 '22 11:09 jjpinto

Thanks for your quick reply ! Let's wait then. In our case we are investigating other options like mongock.

Nico-Chl avatar Sep 15 '22 07:09 Nico-Chl

I think it can be closed. It is possible to disable validation using liquibase.mongodb.supportsValidator=false in liquibase.properties

ivan-zaitsev avatar Jan 24 '24 14:01 ivan-zaitsev

Thanks @ivan-zaitsev You've saved me several days :)

I confirm this issue can be close, the liquibase.mongodb.supportsValidator=false works fine with cosmosDB

Note : the cli parameter is --mongodb-supports-validator=false

Vinss26 avatar Jan 26 '24 16:01 Vinss26