Skip to content

destination-postgres: adopt cleaned-up CDK #34746

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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,48 +1,20 @@
plugins {
id 'application'
id 'airbyte-java-connector'
}

airbyteJavaConnector {
cdkVersionRequired = '0.16.3'
features = [
'db-sources', // required for tests
'db-destinations'
]
cdkVersionRequired = '0.19.0'
features = ['db-destinations', 'typing-deduping', 'datastore-postgres']
useLocalCdk = false
}

//remove once upgrading the CDK version to 0.4.x or later
java {
compileJava {
options.compilerArgs.remove("-Werror")
}
}

airbyteJavaConnector.addCdkDependencies()

application {
mainClass = 'io.airbyte.integrations.destination.postgres.PostgresDestinationStrictEncrypt'
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}

dependencies {
implementation project(':airbyte-integrations:connectors:destination-postgres')
// TODO: declare typing-deduping as a CDK feature instead of importing from source.
implementation project(':airbyte-cdk:java:airbyte-cdk:typing-deduping')

testImplementation libs.testcontainers.jdbc
testImplementation libs.testcontainers.postgresql

testFixturesImplementation libs.testcontainers.jdbc
testFixturesImplementation libs.testcontainers.postgresql

integrationTestJavaImplementation testFixtures(project(':airbyte-integrations:connectors:destination-postgres'))
integrationTestJavaImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:typing-deduping'))
}

configurations.all {
resolutionStrategy {
force libs.jooq
}
}
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
plugins {
id 'application'
id 'airbyte-java-connector'
}

airbyteJavaConnector {
cdkVersionRequired = '0.16.3'
features = [
'db-sources', // required for tests
'db-destinations',
]
cdkVersionRequired = '0.19.0'
features = ['db-destinations', 'datastore-postgres', 'typing-deduping']
useLocalCdk = false
}

//remove once upgrading the CDK version to 0.4.x or later
java {
compileJava {
options.compilerArgs.remove("-Werror")
}
}

airbyteJavaConnector.addCdkDependencies()

application {
mainClass = 'io.airbyte.integrations.destination.postgres.PostgresDestination'
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}

dependencies {
implementation libs.postgresql
// TODO: declare typing-deduping as a CDK feature instead of importing from source.
implementation project(':airbyte-cdk:java:airbyte-cdk:typing-deduping')

testImplementation libs.testcontainers.jdbc
testImplementation libs.testcontainers.postgresql

testFixturesImplementation libs.testcontainers.jdbc
testFixturesImplementation libs.testcontainers.postgresql


integrationTestJavaImplementation libs.testcontainers.postgresql

integrationTestJavaImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:typing-deduping'))
}

configurations.all {
resolutionStrategy {
force libs.jooq
}
testFixturesApi 'org.testcontainers:postgresql:1.19.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
* TODO: This class is a copy from source-postgres:testFixtures. Eventually merge into a common
* fixtures module.
*/
public class PostgresContainerFactory implements ContainerFactory<PostgreSQLContainer<?>> {
public class PostgresContainerFactory extends ContainerFactory<PostgreSQLContainer<?>> {

@Override
public PostgreSQLContainer<?> createNewContainer(DockerImageName imageName) {
protected PostgreSQLContainer<?> createNewContainer(DockerImageName imageName) {
return new PostgreSQLContainer<>(imageName.asCompatibleSubstituteFor("postgres"));

}

@Override
public Class<?> getContainerClass() {
return PostgreSQLContainer.class;
}

/**
Expand Down