Conversation
ath-08
commented
Sep 2, 2026
- Bump Beam version to 2.76.0 to support DirectedReadOptions on SpannerIO.ReadChangeStream
- Add spannerDirectedReadOptions pipeline option to Spanner Change Streams to BigQuery, GCS, and Pub/Sub templates
- Pass directed read options to SpannerIO.readChangeStream() in each template
- Add unit tests validating directed read options configuration
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for Cloud Spanner directed read options within the Spanner Change Streams data pipeline templates. By upgrading the underlying Apache Beam dependency and exposing a new pipeline parameter, users can now specify directed read configurations to optimize Spanner read operations. The changes ensure that these options are correctly propagated to the SpannerIO read stream across all supported output destinations. Highlights
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 by creating a comment using either
Customization To customize the 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 may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates Apache Beam dependencies to version 2.76.0 and introduces support for Cloud Spanner directed read options across several Spanner change streams templates (BigQuery, GCS, and Pub/Sub). It adds the spannerDirectedReadOptions template parameter and updates the respective templates to apply these options when reading from Spanner change streams. The review feedback points out that the unit test in SpannerChangeStreamsToGcsTest.java bypasses the template execution path by manually constructing the pipeline instead of using the run(options) method, and suggests refactoring the test to ensure the template code path is properly verified.
tianz101
left a comment
There was a problem hiding this comment.
Overall very good and the one pager is really helpful.
e573522 to
c138a1d
Compare
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4214 +/- ##
============================================
- Coverage 56.35% 56.34% -0.02%
+ Complexity 7858 7402 -456
============================================
Files 1154 1154
Lines 73194 73197 +3
Branches 8580 8580
============================================
- Hits 41252 41243 -9
- Misses 29158 29167 +9
- Partials 2784 2787 +3
🚀 New features to boost your workflow:
|
…tream templates - Bump Beam version to 2.76.0 to support DirectedReadOptions on SpannerIO.ReadChangeStream - Add spannerDirectedReadOptions pipeline option to Spanner Change Streams to BigQuery, GCS, and Pub/Sub templates - Pass directed read options to SpannerIO.readChangeStream() in each template - Add unit tests validating directed read options configuration
c138a1d to
c92c423
Compare
chamikaramj
left a comment
There was a problem hiding this comment.
I can merge when tests pass.
- Keep directed read unit tests offline and fast: assert that the option value is parsed onto the SpannerConfig used by SpannerIO instead of building a pipeline against a real Cloud Spanner instance. - Add coverage for unset and malformed directed read option values. - Put the Pub/Sub option tests in their own class, since SpannerChangeStreamsToPubSubTest declares a TestPubsubSignal rule that creates real Pub/Sub topics before every test and therefore only runs as an integration test. - Drop the Pub/Sub and BigQuery directed read integration tests; option validation is covered by unit tests and the Cloud Storage IT already validates real pipeline output. - Revert unrelated reformatting of the template descriptions.
c92c423 to
5a2586f
Compare