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

Implement Destination #30

Merged
merged 30 commits into from
Mar 2, 2023
Merged

Implement Destination #30

merged 30 commits into from
Mar 2, 2023

Conversation

oykmnk
Copy link
Contributor

@oykmnk oykmnk commented Jan 20, 2023

Description

This PR seeks to implement Destination logic.

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@oykmnk oykmnk requested review from hariso and maha-hajja January 20, 2023 16:35
acceptance_test.go Outdated Show resolved Hide resolved
acceptance_test.go Outdated Show resolved Hide resolved
acceptance_test.go Show resolved Hide resolved
destination/destination.go Show resolved Hide resolved
Makefile Show resolved Hide resolved
destination/destination_test.go Outdated Show resolved Hide resolved
destination/destination_test.go Show resolved Hide resolved
destination/writer/writer.go Show resolved Hide resolved
@oykmnk oykmnk force-pushed the source branch 6 times, most recently from 91c1205 to 3530c9d Compare February 14, 2023 13:51
common/constants.go Outdated Show resolved Hide resolved
@voscob voscob merged commit e9c219a into source Mar 2, 2023
@voscob voscob deleted the destination branch March 2, 2023 11:52
voscob added a commit that referenced this pull request Mar 2, 2023
* Implement the common config and validator (#1)

* Implement the Source config (#2)

* Implement a Source base (#3)

* Implement the CDC iterator (#5)

This patch seeks to implement the CDC iterator.

It works by creating and listening to a MongoDB Change Stream. 
The Change Stream can be resumed by a `resumeToken` that every Change Stream event has in its payload. 
The CDC iterator stores the `resumeToken` in the Position.

* Implement CDC integration tests (#6)

This patch seeks to implement integration tests for CDC.

* Update the `Config.URI` field (#9)

* Implement the Snapshot iterator (#10)

* Rename `snapshotMode` to `snapshot` (#11)

* Update snapshot iterator, rename `orderingColumn` to `orderingField` (#13)

* Add client options and custom BSON codec to Source (#15)

* Add Source documentation (#16)

* Add database and collection validations (#18)

* store resumeToken in a snapshot position (#19)

* Update Mongo client options (#22)

* Update `GetMongoCollection` function (#23)

* Implement polling snapshot functionality (#26)

This patch seeks to implement polling snapshot functionality. It's used when the full CDC is not available.
For instance, Azure CosmosDB for MongoDB has very limited support for Change Streams, so they cannot be used within the connector.

Signed-off-by: Aleksandr Yakimenko <[email protected]>

* register slice converter

* Remove redundant dot (#34)

Signed-off-by: Aleksandr Yakimenko <[email protected]>

* Fix polling snapshot initialization (#35)

* fixes after review

Signed-off-by: Aleksandr Yakimenko <[email protected]>

* Update .gitignore

* Update Source Parameters with sdk.Validation

* Add the comment for the initialisation of Snapshot iterator

* Add test for EncodeValue of StringObjectIDCodec

* Add t.Parallel to the test for EncodeValue of StringObjectIDCodec

* Update AuthMechanism Source Parameters

* Update modules

* Update test of EncodeValue method

* Add tests for EncodeValue method

* Implement Destination (#30)

* Implement a Destination base

* Implement the Writer for the Destination (#8)

* Implement acceptance test (#14)

* Add Destination documentation (#17)

* Destination integration test (#12)

* Add error check to the destination_test

* Rename the Write return variable

* Add test-integration command

* Update Destination Parameters with sdk.Validation

* Add a few data types to acceptance test

* Update AuthMechanism Destination Parameters

* Update AuthMechanism Destination Parameters

* Add Integration test step to the build github action

* Remove test constant from command package

---------

Co-authored-by: BohdanMyronchuk <[email protected]>
Co-authored-by: Yurii Voskoboinikov <[email protected]>

---------

Signed-off-by: Aleksandr Yakimenko <[email protected]>
Co-authored-by: Yurii Voskoboinikov <[email protected]>
Co-authored-by: BohdanMyronchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants