I am using app services CLI version 1.0.3. I had a perfectly working ci/cd pipeline with the CLI. I am not sure what has changed but after the following small schema change
The following reflects the proposed changes to your app
--- data_sources/mongodb-atlas/***/UserProfile/schema.json
+++ data_sources/mongodb-atlas/***/UserProfile/schema.json
@@ -5,6 +5,13 @@
},
"MoversSuiteCompanyBranchId": {
"bsonType": "string"
+ },
+ "Roles": {
+ "bsonType": "array",
+ "items": {
+ "bsonType": "string"
+ },
+ "uniqueItems": true
},
"UserId": {
"bsonType": "string"
when I try to do appservices push I receive the following error and I can’t push my changes to the cloud.
push failed: minimum required protocol version increase change not allowed: updating the sync schema compatibility version from 1 to 3, please ensure that you have updated to the most recent version of the client SDK, will add new property "Roles" to schema "mongodb-atlas.***.UserProfile"
What am I doing wrong? What is the “protocol version”? And how exactly I’ve increased it?
Hi, unfortunately, you hit an intentional guardrail we placed a while ago when releasing Set / Dictionary / Mixed support. When you do so, you make any realm client from before those data types were released (1.5 years ago) no longer able to connect to sync, so we wanted to ensure people do not perform this action lightly.
We are working on making the CLI capable of. bypassing these things, perhaps with some sort of dialogue (y/n), but in the meantime, your options are:
Use the UI (I realize this is not what you want)
Use an array instead of a set (that is what is incrementing the minimum version)
Terminate sync, make the change, enable sync
If this is a general pipeline, I think that if you create a new schema after creating an app we will allow that since we can be sure this is a new app with new clients.
I will also file a ticket to revisit this guardrail since it has been a long time.
Now it does make sense. So, if I understood correctly, certain types have been introduced later, which might not be supported by the currently synced clients, and hence, those are considered breaking changes.
I think, in this case, it’s not critical; I will use an array instead of a set. But, it’s good to understand what’s happening under the hood!