-
Notifications
You must be signed in to change notification settings - Fork 940
Backport Android updateTransform changes #4225
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
Conversation
|
Changeset File Check
|
Size Analysis ReportAffected Products
|
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
size | ? | 7.52 kB | ? (?) |
size_with_ext_deps | ? | 24.9 kB | ? (?) |
Dependencies
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
functions | ? | Click to show 20 depsarrayToBase64 checkTokenDetails dbGet dbRemove dbSet deleteToken deleteTokenInternal extractAppConfig getDbPromise getEndpoint getHeaders getKey getMissingValueError isSWControllerSupported isSupported isWindowControllerSupported migrateOldDatabase registerDefaultSw registerMessaging requestDeleteToken |
? |
classes | ? | MessagingService |
? |
variables | ? | Click to show 14 depsDATABASE_NAME DATABASE_VERSION DEFAULT_SW_PATH DEFAULT_SW_SCOPE ENDPOINT ERROR_FACTORY ERROR_MAP MessageType OBJECT_STORE_NAME OLD_DB_NAME OLD_DB_VERSION OLD_OBJECT_STORE_NAME dbPromise messagingFactory |
? |
External Dependencies
Module | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory |
? |
idb |
? | deleteDb openDb |
? |
@firebase/installations-exp |
? | getToken |
? |
@firebase/app-exp |
? | _registerComponent |
? |
@firebase/component |
? | Component |
? |
getMessaging
Size
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
size | ? | 3.67 kB | ? (?) |
size_with_ext_deps | ? | 21.0 kB | ? (?) |
Dependencies
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
functions | ? | Click to show 7 depsextractAppConfig getMessaging getMissingValueError isSWControllerSupported isSupported isWindowControllerSupported registerMessaging |
? |
classes | ? | MessagingService |
? |
variables | ? | ERROR_FACTORY ERROR_MAP MessageType messagingFactory |
? |
External Dependencies
Module | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory |
? |
@firebase/app-exp |
? | _getProvider _registerComponent |
? |
@firebase/component |
? | Component |
? |
getToken
Size
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
size | ? | 12.0 kB | ? (?) |
size_with_ext_deps | ? | 29.5 kB | ? (?) |
Dependencies
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
functions | ? | Click to show 39 depsarrayToBase64 base64ToArray checkTokenDetails dbGet dbRemove dbSet deleteTokenInternal externalizePayload extractAppConfig getBody getDbPromise getEndpoint getEventType getHeaders getKey getMissingValueError getNewToken getPushSubscription getToken getTokenInternal isConsoleMessage isSWControllerSupported isSupported isTokenValid isWindowControllerSupported logToScion messageEventListener migrateOldDatabase propagateDataPayload propagateFcmOptions propagateNotificationPayload registerDefaultSw registerMessaging requestDeleteToken requestGetToken requestUpdateToken updateSwReg updateToken updateVapidKey |
? |
classes | ? | MessagingService |
? |
variables | ? | Click to show 20 depsCONSOLE_CAMPAIGN_ANALYTICS_ENABLED CONSOLE_CAMPAIGN_ID CONSOLE_CAMPAIGN_NAME CONSOLE_CAMPAIGN_TIME DATABASE_NAME DATABASE_VERSION DEFAULT_SW_PATH DEFAULT_SW_SCOPE DEFAULT_VAPID_KEY ENDPOINT ERROR_FACTORY ERROR_MAP MessageType OBJECT_STORE_NAME OLD_DB_NAME OLD_DB_VERSION OLD_OBJECT_STORE_NAME TOKEN_EXPIRATION_MS dbPromise messagingFactory |
? |
External Dependencies
Module | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory |
? |
idb |
? | deleteDb openDb |
? |
@firebase/installations-exp |
? | getToken |
? |
@firebase/app-exp |
? | _registerComponent |
? |
@firebase/component |
? | Component |
? |
onMessage
Size
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
size | ? | 5.19 kB | ? (?) |
size_with_ext_deps | ? | 22.6 kB | ? (?) |
Dependencies
Type | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
functions | ? | Click to show 15 depsexternalizePayload extractAppConfig getEventType getMissingValueError isConsoleMessage isSWControllerSupported isSupported isWindowControllerSupported logToScion messageEventListener onMessage propagateDataPayload propagateFcmOptions propagateNotificationPayload registerMessaging |
? |
classes | ? | MessagingService |
? |
variables | ? | Click to show 8 depsCONSOLE_CAMPAIGN_ANALYTICS_ENABLED CONSOLE_CAMPAIGN_ID CONSOLE_CAMPAIGN_NAME CONSOLE_CAMPAIGN_TIME ERROR_FACTORY ERROR_MAP MessageType messagingFactory |
? |
External Dependencies
Module | Base (1a8cb40) | Head (d1917c2) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory |
? |
@firebase/app-exp |
? | _registerComponent |
? |
@firebase/component |
? | Component |
? |
Test Logs
@@ -689,14 +675,6 @@ function localTransformResults( | |||
previousValue = maybeDoc.field(fieldTransform.field); | |||
} | |||
|
|||
if (previousValue === null && baseDoc instanceof Document) { |
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.
Why is this logic no longer needed? This seems pretty critical. Or is it handled elsewhere now?
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.
My understanding is that this if-statement checks for the edge case where a PatchMutation clears the values of a nested map before the TransformMutation is applied. With the addition of updateTransforms, field transformation are encoded directly on the Patch or Set Mutation, rather than in a separate TransformMutation. This means that we won't bump into this edge case anymore since the update and fieldTransform are on the same mutation and thus applied at the same time.
I've also removed the now obsolete server timestamp test that tested this edge case.
Co-authored-by: Gil <[email protected]>
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.
LGTM
After porting update transforms to Android, I found some changes that needed to be ported back. I also replaced usages of TransformMutation.