Skip to content
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

[RTDB] Use NSURLSessionWebSocket instead of SocketRocket where possible #12894

Merged
merged 11 commits into from
May 8, 2024

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented May 3, 2024

Use the previously implemented NSURLSessionWebSocket for all platforms that support it instead of only watchOS where it was only previously used.

Fix #12883

@google-oss-bot
Copy link

google-oss-bot commented May 3, 2024

Coverage Report 1

Affected Products

  • FirebaseDatabase-iOS-FirebaseDatabase.framework

    Overall coverage changed from ? (dda0e18) to 53.85% (b051973) by ?.

    105 individual files with coverage change

    FilenameBase (dda0e18)Merge (b051973)Diff
    APLevelDB.mm?61.30%?
    DatabaseReference+WriteEncodable.swift?0.00%?
    DataSnapshot+ReadDecodable.swift?0.00%?
    FAckUserWrite.m?83.33%?
    FArraySortedDictionary.m?97.49%?
    FAtomicNumber.m?100.00%?
    fbase64.c?31.20%?
    FCacheNode.m?100.00%?
    FCachePolicy.m?17.14%?
    FCancelEvent.m?0.00%?
    FChange.m?88.24%?
    FChildChangeAccumulator.m?65.22%?
    FChildEventRegistration.m?0.00%?
    FChildrenNode.m?91.16%?
    FClock.m?100.00%?
    FCompoundHash.m?97.70%?
    FCompoundWrite.m?91.12%?
    FConnection.m?26.81%?
    FDataEvent.m?29.41%?
    FEmptyNode.m?100.00%?
    FEventEmitter.m?0.00%?
    FEventGenerator.m?95.37%?
    FEventRaiser.m?33.33%?
    FImmutableSortedDictionary.m?31.03%?
    FImmutableSortedSet.m?54.22%?
    FImmutableTree.m?85.75%?
    FIndex.m?91.67%?
    FIndexedFilter.m?96.38%?
    FIndexedNode.m?97.06%?
    FIRDatabase.m?15.76%?
    FIRDatabaseComponent.m?19.23%?
    FIRDatabaseConfig.m?59.62%?
    FIRDatabaseConnectionContextProvider.m?96.67%?
    FIRDatabaseQuery.m?3.86%?
    FIRDatabaseReference.m?6.41%?
    FIRDataSnapshot.m?89.71%?
    FIRMutableData.m?75.51%?
    FIRRetryHelper.m?88.10%?
    FIRServerValue.m?0.00%?
    FIRTransactionResult.m?0.00%?
    FKeepSyncedEventRegistration.m?0.00%?
    FKeyIndex.m?60.56%?
    FLeafNode.m?86.98%?
    FLevelDBStorageEngine.m?71.40%?
    FLimitedFilter.m?97.25%?
    FListenComplete.m?0.00%?
    FLLRBEmptyNode.m?75.00%?
    FLLRBValueNode.m?85.39%?
    FMaxNode.m?60.61%?
    FMerge.m?87.18%?
    FNamedNode.m?62.32%?
    FNextPushId.m?62.50%?
    FOperationSource.m?89.29%?
    FOverwrite.m?81.48%?
    FPath.m?94.30%?
    FPathIndex.m?88.75%?
    FPendingPut.m?0.00%?
    FPersistenceManager.m?55.19%?
    FPersistentConnection.m?21.26%?
    FPriorityIndex.m?87.84%?
    FPruneForest.m?93.08%?
    FQueryParams.m?96.24%?
    FQuerySpec.m?86.36%?
    FRangedFilter.m?93.67%?
    FRangeMerge.m?94.06%?
    FRepo.m?13.48%?
    FRepoInfo.m?73.00%?
    FRepoManager.m?29.86%?
    FServerValues.m?50.85%?
    FSnapshotHolder.m?100.00%?
    FSnapshotUtilities.m?62.06%?
    FSparseSnapshotTree.m?98.13%?
    FSRWebSocket.m?0.00%?
    FStringUtilities.m?79.41%?
    FSyncPoint.m?87.80%?
    FSyncTree.m?71.33%?
    FTrackedQuery.m?75.38%?
    FTrackedQueryManager.m?90.50%?
    FTransformedEnumerator.m?100.00%?
    FTree.m?6.04%?
    FTreeNode.m?100.00%?
    FTreeSortedDictionary.m?96.17%?
    FTreeSortedDictionaryEnumerator.m?100.00%?
    FTupleNodePath.m?0.00%?
    FTupleObjectNode.m?0.00%?
    FTuplePathValue.m?100.00%?
    FTupleRemovedQueriesEvents.m?100.00%?
    FTupleSetIdPath.m?0.00%?
    FTupleStringNode.m?0.00%?
    FTupleTransaction.m?0.00%?
    FTupleUserCallback.m?0.00%?
    FUtilities.m?74.01%?
    FValidation.m?25.32%?
    FValueEventRegistration.m?0.00%?
    FValueIndex.m?48.53%?
    FView.m?80.11%?
    FViewCache.m?100.00%?
    FViewProcessor.m?91.87%?
    FViewProcessorResult.m?100.00%?
    FWebSocketConnection.m?39.63%?
    FWriteRecord.m?45.65%?
    FWriteTree.m?75.44%?
    FWriteTreeRef.m?100.00%?
    NSData+SRB64Additions.m?81.82%?
    ServerTimestamp.swift?0.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/hz1Gyezacv.html

@mortenbekditlevsen
Copy link
Contributor

It should also allow socks proxying of the websocket connection which the used version of SocketRocket did not, so huge thumbs up from here! 😊👍🏻

@paulb777
Copy link
Member Author

paulb777 commented May 4, 2024

The frequent, but not always, integration test failure in testDeepUpdatesWork is specific to Arm macs versus Intel macs and also specific to using the emulator. Skipping the test for now.

@paulb777 paulb777 added this to the 10.27.0 - M148 milestone May 4, 2024
paulb777 and others added 2 commits May 8, 2024 07:42
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
@paulb777
Copy link
Member Author

paulb777 commented May 8, 2024

cc: @maneesht

@paulb777 paulb777 merged commit 1c605b2 into main May 8, 2024
62 checks passed
@paulb777 paulb777 deleted the pb-replace-socket-rocket branch May 8, 2024 15:10
@firebase firebase locked and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FirebaseDatabase Thread Performance Checker warning
4 participants