-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
RCOCOA-2333: Add tests for sync schema migrations #8542
base: master
Are you sure you want to change the base?
Conversation
@@ -143,8 +143,9 @@ typealias Json = Any | |||
#endif | |||
|
|||
private extension ObjectSchema { | |||
func stitchRule(_ partitionKeyType: String?, id: String? = nil, appId: String) -> [String: Json] { | |||
func stitchRule(_ partitionKeyType: String?, id: String? = nil, appId: String, title: String?) -> [String: Json] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is required to ensure that the title of the collection matches the name of the table whenever we override the table name using _realmObjectName
.
|
||
// We only need to create the userData rule for .pbs since for .flx we | ||
// have a default rule that covers all collections | ||
let userDataRule: [String: Json] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current baas version will error out if we attempt to insert this rule for a qbs app because it's incompatible with qbs rules.
session.privateApps[appId].settings.patch(on: group, [ | ||
"sync": ["disable_client_error_backoff": true] | ||
], failOnError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting a 403 when we attempt to execute this request. I need to check if it's still necessary and why we're no longer authorized to make it.
@@ -1,7 +1,7 @@ | |||
{ | |||
"events": { | |||
"database": { | |||
"maxCoordinatorChangeStreams": 50000 | |||
"maxCoordinatorChangeStreams": "50000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current baas expects this to be a quoted int.
@@ -1,3 +1,3 @@ | |||
VERSION=10.49.1 | |||
REALM_CORE_VERSION=v14.5.0 | |||
STITCH_VERSION=8bf8ebcff6e804586c30a6ccbadb060753071a42 | |||
STITCH_VERSION=88756085ea34f3887669cd6d7764aedf44795b44 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to bump this to pick up some fixes for the schema versioning functionality.
This adds tests for sync schema migrations. The feature is enabled by specifying a non-zero
schemaVersion
on the realm configuration, so we already supported it, so this is only adding test to ensure the value is correctly routed to Core/Sync/Server.