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

Metadata config and pipeline options #2081

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

akashthawaitcc
Copy link

This PR introduces a comprehensive refactor and enhancement of the migration workflow to streamline schema handling and extend support for Cassandra sources. Key changes include:

  1. Schema Population for Cassandra Sources:
  2. Refactored logic to efficiently populate schemas for Cassandra sources, ensuring better maintainability and readability.
  3. Schema Population for Spanner Using DDL:
  4. Added robust handling for schema population from DDL statements to support Spanner targets.
  5. Pipeline Option Enhancements for Cassandra:
  6. Updated pipeline options to seamlessly incorporate Cassandra-related configurations.
  7. Enhanced SourceWriterFn for Cassandra Functionality:
  8. Extended the SourceWriterFn implementation to support Cassandra-specific operations, enabling improved functionality.
  9. Implementation of Cassandra Connection Helper:
  10. Introduced a CassandraConnectionHelper to abstract and simplify connection handling for Cassandra, ensuring consistency and reducing redundancy.

@akashthawaitcc akashthawaitcc marked this pull request as ready for review December 23, 2024 11:23
@akashthawaitcc akashthawaitcc requested a review from a team as a code owner December 23, 2024 11:23
Copy link
Contributor

@bharadwaj-aditya bharadwaj-aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a few comments. The major concerns here are

  1. There seems to be overlap with - Cassandra Driver Config Loader for Cassandra Driver Config in GCS #2077. Please rebase from there once it is merged (ETA - Today EOD)
  2. There are no tests added here.

pawankashyapollion and others added 5 commits December 30, 2024 11:59
Co-authored-by: Narendra Rajput <narendra.rajput@ollion.com>
* Removed *

* Create README.md for UDF samples (GoogleCloudPlatform#2083)

This commit adds a README.md file to the  directory. The README file provides descriptions for each of the sample Javascript UDF files in the directory, including their purpose and usage examples.

Co-authored-by: labs-code-app[bot] <161369871+labs-code-app[bot]@users.noreply.github.com>

* CassandraDriverConfigLoader from GCS (GoogleCloudPlatform#2077)

* Added Config File Path

* Added Fix for Loading Driver Options

* Added Dependecy Fixes

* Fix UT

---------

Co-authored-by: liferoad <huxiangqian@gmail.com>
Co-authored-by: labs-code-app[bot] <161369871+labs-code-app[bot]@users.noreply.github.com>
Co-authored-by: Vardhan Vinay Thigle <39047439+VardhanThigle@users.noreply.github.com>
* Convert it to builder Pattern

* Convert Waring to Error

* remove the unwanted comments
@pawankashyapollion pawankashyapollion force-pushed the metadata_config_and_pipeline_options branch from 7a2d80a to 928fba9 Compare December 30, 2024 06:30
Copy link
Contributor

@shreyakhajanchi shreyakhajanchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests for all the java classes added/modified

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 11.35371% with 203 lines in your changes missing coverage. Please review.

Project coverage is 46.19%. Comparing base (587fc05) to head (245cd6e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...r/migrations/metadata/CassandraSourceMetadata.java 0.00% 51 Missing ⚠️
.../dbutils/connection/CassandraConnectionHelper.java 7.31% 38 Missing ⚠️
...rt/v2/spanner/migrations/shard/CassandraShard.java 0.00% 35 Missing ⚠️
...t/v2/spanner/migrations/spanner/SpannerSchema.java 0.00% 30 Missing ⚠️
...cloud/teleport/v2/templates/SpannerToSourceDb.java 0.00% 19 Missing ⚠️
...er/migrations/utils/CassandraConfigFileReader.java 0.00% 10 Missing ⚠️
.../v2/templates/dbutils/dao/source/CassandraDao.java 0.00% 9 Missing ⚠️
...leport/v2/templates/transforms/SourceWriterFn.java 0.00% 7 Missing and 1 partial ⚠️
.../teleport/v2/spanner/migrations/schema/Schema.java 0.00% 2 Missing ⚠️
...ates/dbutils/processor/SourceProcessorFactory.java 95.83% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2081      +/-   ##
============================================
- Coverage     46.39%   46.19%   -0.20%     
- Complexity     3930     4260     +330     
============================================
  Files           859      866       +7     
  Lines         51300    51553     +253     
  Branches       5394     5410      +16     
============================================
+ Hits          23800    23817      +17     
- Misses        25786    26021     +235     
- Partials       1714     1715       +1     
Components Coverage Δ
spanner-templates 67.48% <11.35%> (-0.77%) ⬇️
spanner-import-export 65.57% <ø> (ø)
spanner-live-forward-migration 74.20% <0.00%> (-2.47%) ⬇️
spanner-live-reverse-replication 74.75% <11.35%> (-3.19%) ⬇️
spanner-bulk-migration 85.55% <0.00%> (-1.76%) ⬇️
Files with missing lines Coverage Δ
...ort/v2/spanner/migrations/constants/Constants.java 0.00% <ø> (ø)
...plates/dbutils/processor/InputRecordProcessor.java 92.45% <ø> (ø)
...ates/dbutils/processor/SourceProcessorFactory.java 90.47% <95.83%> (+0.89%) ⬆️
.../teleport/v2/spanner/migrations/schema/Schema.java 88.59% <0.00%> (-1.59%) ⬇️
...leport/v2/templates/transforms/SourceWriterFn.java 79.67% <0.00%> (-5.55%) ⬇️
.../v2/templates/dbutils/dao/source/CassandraDao.java 67.85% <0.00%> (-32.15%) ⬇️
...er/migrations/utils/CassandraConfigFileReader.java 0.00% <0.00%> (ø)
...cloud/teleport/v2/templates/SpannerToSourceDb.java 0.00% <0.00%> (ø)
...t/v2/spanner/migrations/spanner/SpannerSchema.java 0.00% <0.00%> (ø)
...rt/v2/spanner/migrations/shard/CassandraShard.java 0.00% <0.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

Copy link
Contributor

@bharadwaj-aditya bharadwaj-aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests for all the classes added.

@bharadwaj-aditya
Copy link
Contributor

The test coverage on this PR has dropped 3% across the project. Can you please add unit tests here ?

* Added Dummy Test case

* Removed * from import

* removed unwanted

* Added Fixes

* Added test case and fixes

* Added Some more PR comments

* Added Test case for Cassandra Reader

* Added New testcase

* Added Dependecny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants