[realppl 9] realppl public api and integration tests#14931
[realppl 9] realppl public api and integration tests#14931wu-hui wants to merge 1 commit intowuandy/RealPpl_8from
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback. |
Generated by 🚫 Danger |
|
|
||
| @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) | ||
| public struct PipelineSource: @unchecked Sendable { | ||
| public struct PipelineSource<P>: @unchecked Sendable { |
There was a problem hiding this comment.
Hi Andy, I remember in the discussion we decided to avoid using generic and go with RealtimePipelineSource ?
There was a problem hiding this comment.
There are some source, for example database is not available for the realtime ppl (although we can relay on runtime checking)
f7273d4 to
676dc22
Compare
c33f64a to
020bfbc
Compare
38b72bd to
c2bf5ec
Compare
9a4b558 to
fb16f96
Compare
c2bf5ec to
b5ad143
Compare
fb16f96 to
f85881b
Compare
5a19c8f to
8b8d4a2
Compare
f85881b to
0d65b86
Compare
8b8d4a2 to
70c3278
Compare
3c2fbf7 to
b9d0d1a
Compare
70c3278 to
27a4b92
Compare
b9d0d1a to
f28fc1d
Compare
bf5a534 to
e059610
Compare
f28fc1d to
7fdd160
Compare
e059610 to
8d1e709
Compare
c9c5990 to
a99fe2e
Compare
8d1e709 to
587b678
Compare
a99fe2e to
ac94a87
Compare
c6f2775 to
0e39951
Compare
ac94a87 to
016dac0
Compare
016dac0 to
dde6ee9
Compare
0e39951 to
042515a
Compare
| if (databaseId) { | ||
| defaultDatabaseId = databaseId; | ||
| } else { | ||
| defaultDatabaseId = @"enterprise"; |
There was a problem hiding this comment.
In the feature branch we use (void)switchToEnterpriseMode to turn on enterprise mode for testing. I think that way is better than using enterprise database id as default.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new realtime pipeline feature, including public APIs for Objective-C and Swift, and integration tests. The changes are extensive and well-structured. I've found a few issues to address. The Xcode project file has several duplicate entries which could cause build problems. There's also a critical bug in the new Swift API that could lead to a crash. Finally, a public API was removed, which might be a breaking change.
| return bridge.addSnapshotListener(options: options.bridge) { snapshotBridge, error in | ||
| listener( | ||
| RealtimePipelineSnapshot( | ||
| // TODO(pipeline): this needs to be fixed | ||
| snapshotBridge!, | ||
| pipeline: self | ||
| ), | ||
| error | ||
| ) | ||
| } |
There was a problem hiding this comment.
The force unwrap of snapshotBridge! will cause a crash if an error occurs and the snapshot is nil. The listener callback should handle the nil snapshot case gracefully when an error is present.
The TODO comment also indicates this might be known. This should be fixed before merging.
return bridge.addSnapshotListener(options: options.bridge) { snapshotBridge, error in
if let error = error {
listener(nil, error)
return
}
if let snapshotBridge = snapshotBridge {
let snapshot = RealtimePipelineSnapshot(snapshotBridge, pipeline: self)
listener(snapshot, nil)
}
}| 101393F60336924F64966C74 /* globals_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4564AD9C55EC39C080EB9476 /* globals_cache_test.cc */; }; | ||
| 1029F0461945A444FCB523B3 /* leveldb_local_store_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5FF903AEFA7A3284660FA4C5 /* leveldb_local_store_test.cc */; }; | ||
| 10B69419AC04F157D855FED7 /* leveldb_document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AE89CFF09C6804573841397F /* leveldb_document_overlay_cache_test.cc */; }; | ||
| 11105C1A9E2065B6A3816983 /* pipeline_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9F12A488C443DBCCEC54DB61 /* pipeline_util_test.cc */; }; |
| 1296CECE2DEE97F5007F8552 /* RealtimePipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1296CECD2DEE97EF007F8552 /* RealtimePipelineTests.swift */; }; | ||
| 1296CECF2DEE97F5007F8552 /* RealtimePipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1296CECD2DEE97EF007F8552 /* RealtimePipelineTests.swift */; }; | ||
| 1296CED02DEE97F5007F8552 /* RealtimePipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1296CECD2DEE97EF007F8552 /* RealtimePipelineTests.swift */; }; |
| return factory([CollectionSource(collection: normalizedPath)], db) | ||
| } | ||
|
|
||
| public func collection(_ ref: CollectionReference) -> Pipeline { | ||
| let collectionStage = CollectionSource(collection: ref, db: db) | ||
| return Pipeline(stages: [collectionStage], db: db) | ||
| } |
|
@wu-hui , I'm doing some review of open PRs. Can this be closed now that pipelines is in main? |
No description provided.