Skip to content

Commit 7058132

Browse files
committed
throw exception on bad generation id
1 parent 666e1aa commit 7058132

File tree

1 file changed

+10
-3
lines changed
  • airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/kotlin/io/airbyte/integrations/base/destination/typing_deduping

1 file changed

+10
-3
lines changed

airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/kotlin/io/airbyte/integrations/base/destination/typing_deduping/CatalogParser.kt

+10-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ constructor(
3333
if (it.stream.namespace.isNullOrEmpty()) {
3434
it.stream.namespace = defaultNamespace
3535
}
36+
// The refreshes project is the beginning of the end for OVERWRITE syncs.
37+
// The sync mode still exists, but we are fully dependent on min_generation to trigger
38+
// overwrite logic.
39+
if (it.destinationSyncMode == DestinationSyncMode.OVERWRITE) {
40+
it.destinationSyncMode = DestinationSyncMode.APPEND
41+
}
3642
}
3743

3844
// this code is bad and I feel bad
@@ -127,9 +133,10 @@ constructor(
127133
@VisibleForTesting
128134
fun toStreamConfig(stream: ConfiguredAirbyteStream): StreamConfig {
129135
if (stream.generationId == null) {
130-
stream.generationId = 0
131-
stream.minimumGenerationId = 0
132-
stream.syncId = 0
136+
// TODO set platform version
137+
throw ConfigErrorException(
138+
"You must upgrade your platform version to use this connector version. Either downgrade your connector or upgrade platform to X.Y.Z"
139+
)
133140
}
134141
if (
135142
stream.minimumGenerationId != 0.toLong() &&

0 commit comments

Comments
 (0)