Skip to content

Conversation

@aasthabharill
Copy link
Member

@gemini-code-assist
Copy link

Summary of Changes

Hello @aasthabharill, 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 addresses a critical issue where certain events, specifically those related to tables being dropped during a live migration, were silently lost within the Datastream-to-Spanner pipeline. The changes introduce a robust mechanism to capture, categorize, and persist these 'skipped' events to a dedicated Dead Letter Queue in GCS. This significantly improves the observability and reliability of the pipeline by preventing silent data loss and providing a clear audit trail for such occurrences.

Highlights

  • Introduced SKIPPED_EVENT_TAG: A new TupleTag, SKIPPED_EVENT_TAG, has been added to explicitly categorize and track events that are skipped, primarily due to DroppedTableException.
  • Dedicated Dead Letter Queue for Skipped Events: Events tagged with SKIPPED_EVENT_TAG are now routed to a dedicated Dead Letter Queue (DLQ) directory in Google Cloud Storage (GCS) under /skipped/, ensuring they are no longer silently lost.
  • Enhanced Error Handling in SpannerTransactionWriter: The SpannerTransactionWriter now explicitly handles and outputs SKIPPED_EVENT_TAG events, integrating them into its result structure alongside permanent and retryable errors.
  • Improved DroppedTableException Handling: The SpannerTransactionWriterDoFn and ChangeEventTransformerDoFn now output DroppedTableException events using the new SKIPPED_EVENT_TAG to the DLQ, instead of silently logging them as errors or warnings.
  • Updated Test Coverage: An existing test case in ChangeEventTransformerDoFnTest has been updated to verify that DroppedTableException correctly triggers an output with the SKIPPED_EVENT_TAG.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 8.00000% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.87%. Comparing base (f2c600c) to head (2503f4e).

Files with missing lines Patch % Lines
...oud/teleport/v2/templates/DataStreamToSpanner.java 0.00% 17 Missing ⚠️
...eleport/v2/templates/SpannerTransactionWriter.java 0.00% 5 Missing ⚠️
...ort/v2/templates/SpannerTransactionWriterDoFn.java 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (8.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    #3276      +/-   ##
============================================
+ Coverage     50.92%   54.87%   +3.94%     
+ Complexity     5166     2277    -2889     
============================================
  Files           979      493     -486     
  Lines         60503    28882   -31621     
  Branches       6617     3036    -3581     
============================================
- Hits          30813    15848   -14965     
+ Misses        27533    12070   -15463     
+ Partials       2157      964    -1193     
Components Coverage Δ
spanner-templates 71.83% <8.00%> (+0.93%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 79.74% <8.00%> (-0.30%) ⬇️
spanner-live-reverse-replication 77.57% <ø> (-0.07%) ⬇️
spanner-bulk-migration 88.07% <ø> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...emplates/transform/ChangeEventTransformerDoFn.java 77.41% <100.00%> (+0.18%) ⬆️
...ort/v2/templates/SpannerTransactionWriterDoFn.java 51.56% <0.00%> (-0.24%) ⬇️
...eleport/v2/templates/SpannerTransactionWriter.java 0.00% <0.00%> (ø)
...oud/teleport/v2/templates/DataStreamToSpanner.java 17.97% <0.00%> (-1.15%) ⬇️

... and 504 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant