Skip to content

[Source-mongo] : Migrate to Kotlin #36845

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

Merged
merged 7 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.29.1
version=0.29.2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface DebeziumEventConverter {
fun toAirbyteMessage(event: ChangeEventWithMetadata): AirbyteMessage

companion object {
@JvmStatic
fun buildAirbyteMessage(
source: JsonNode?,
cdcMetadataInjector: CdcMetadataInjector<*>,
Expand All @@ -35,6 +36,7 @@ interface DebeziumEventConverter {
.withRecord(airbyteRecordMessage)
}

@JvmStatic
fun addCdcMetadata(
baseNode: ObjectNode,
source: JsonNode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ object AutoCloseableIterators {
* @param <T> type
* @return new autocloseable iterator with the close function appended </T>
*/
@JvmStatic
fun <T> appendOnClose(
autoCloseableIterator: AutoCloseableIterator<T>,
voidCallable: VoidCallable
Expand Down Expand Up @@ -254,6 +255,7 @@ object AutoCloseableIterators {
return CompositeIterator(iterators, airbyteStreamStatusConsumer)
}

@JvmStatic
fun <T> concatWithEagerClose(iterators: List<AutoCloseableIterator<T>>): CompositeIterator<T> {
return concatWithEagerClose(iterators, null)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.28.0'
cdkVersionRequired = '0.29.1'
features = ['db-sources', 'datastore-mongo']
useLocalCdk = false
useLocalCdk = true
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: b2e713cd-cc36-4c0a-b5bd-b47cb8a0561e
dockerImageTag: 1.3.1
dockerImageTag: 1.3.2
dockerRepository: airbyte/source-mongodb-v2
documentationUrl: https://docs.airbyte.com/integrations/sources/mongodb-v2
githubIssueLabel: source-mongodb-v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.debezium.connector.mongodb.ResumeTokens;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;
import org.bson.BsonDocument;
import org.bson.BsonTimestamp;
import org.slf4j.Logger;
Expand Down Expand Up @@ -88,7 +89,7 @@ public boolean isEventAheadOffset(final Map<String, String> offset, final Change
}

@Override
public boolean isSameOffset(final Map<String, String> offsetA, final Map<String, String> offsetB) {
public boolean isSameOffset(@Nullable final Map<String, String> offsetA, @Nullable final Map<String, String> offsetB) {
if (offsetA == null || offsetA.size() != 1) {
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/mongodb-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ For more information regarding configuration parameters, please see [MongoDb Doc

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------------------------------------------------------------|
| 1.3.1 | 2024-04-04 | [36837](https://github.com/airbytehq/airbyte/pull/36837) | Full refresh read of collections. |
| 1.3.1 | 2024-04-04 | [36837](https://github.com/airbytehq/airbyte/pull/36837) | Adopt Kotlin CDK. |
| 1.3.1 | 2024-04-04 | [36837](https://github.com/airbytehq/airbyte/pull/36837) | Adopt CDK 0.28.0. |
| 1.3.0 | 2024-03-15 | [35669](https://github.com/airbytehq/airbyte/pull/35669) | Full refresh read of collections. |
| 1.2.16 | 2024-03-06 | [35669](https://github.com/airbytehq/airbyte/pull/35669) | State message will now include record count. |
| 1.2.15 | 2024-02-27 | [35673](https://github.com/airbytehq/airbyte/pull/35673) | Consume user provided connection string. |
Expand Down
Loading