From 681796188c0382351127e188f634113f596f0d43 Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Thu, 10 Nov 2022 18:51:09 +0200 Subject: [PATCH 1/7] Postgres Source: use native Postgres timeout if it's not set by the user --- .../airbyte/db/factory/DataSourceFactory.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java index f4f33dc455f8c..579fac299ac68 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java @@ -4,12 +4,15 @@ package io.airbyte.db.factory; +import static org.postgresql.PGProperty.CONNECT_TIMEOUT; + import com.google.common.base.Preconditions; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import java.io.Closeable; import java.time.Duration; import java.util.Map; +import java.util.Objects; import javax.sql.DataSource; /** @@ -61,7 +64,7 @@ public static DataSource create(final String username, .withJdbcUrl(jdbcConnectionString) .withPassword(password) .withUsername(username) - .withConnectionTimeoutMs(DataSourceBuilder.getConnectionTimeoutMs(connectionProperties)) + .withConnectionTimeoutMs(DataSourceBuilder.getConnectionTimeoutMs(connectionProperties, driverClassName)) .build(); } @@ -179,7 +182,6 @@ private static class DataSourceBuilder { private String password; private int port = 5432; private String username; - private static final String CONNECT_TIMEOUT_KEY = "connectTimeout"; private static final Duration CONNECT_TIMEOUT_DEFAULT = Duration.ofSeconds(60); private DataSourceBuilder() {} @@ -196,20 +198,20 @@ private DataSourceBuilder() {} * * @param connectionProperties custom jdbc_url_parameters containing information on connection * properties + * @param driverClassName name of the JDBC driver * @return DataSourceBuilder class used to create dynamic fields for DataSource */ - private static long getConnectionTimeoutMs(final Map connectionProperties) { - final Duration connectionTimeout; - // TODO: the usage of CONNECT_TIMEOUT_KEY is Postgres specific, may need to extend for other - // databases - connectionTimeout = - connectionProperties.containsKey(CONNECT_TIMEOUT_KEY) ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(CONNECT_TIMEOUT_KEY))) - : CONNECT_TIMEOUT_DEFAULT; - if (connectionTimeout.getSeconds() == 0) { - return connectionTimeout.toMillis(); - } else { - return (connectionTimeout.compareTo(CONNECT_TIMEOUT_DEFAULT) > 0 ? connectionTimeout : CONNECT_TIMEOUT_DEFAULT).toMillis(); - } + private static long getConnectionTimeoutMs(final Map connectionProperties, String driverClassName) { + // TODO: the usage of CONNECT_TIMEOUT is Postgres specific, may need to extend for other databases + final String pgPropertyConnectTimeout = CONNECT_TIMEOUT.getName(); + return (connectionProperties.containsKey(pgPropertyConnectTimeout) + && (Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout)) > 0)) + ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout))).toMillis() + // If the PGProperty.CONNECT_TIMEOUT was set by the user, then take its value, if not take the + // default + : driverClassName.equals(DatabaseDriver.POSTGRESQL.getDriverClassName()) + ? Duration.ofSeconds(Long.parseLong(Objects.requireNonNull(CONNECT_TIMEOUT.getDefaultValue()))).toMillis() + : CONNECT_TIMEOUT_DEFAULT.toMillis(); } public DataSourceBuilder withConnectionProperties(final Map connectionProperties) { From 01625a77cb3b8c081d9b8e1bbafbd151c085abbe Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Fri, 11 Nov 2022 11:43:42 +0200 Subject: [PATCH 2/7] refactoring --- .../airbyte/db/factory/DataSourceFactory.java | 22 +++++++++++-------- docs/integrations/sources/postgres.md | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java index 579fac299ac68..b213aac821105 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java @@ -203,15 +203,19 @@ private DataSourceBuilder() {} */ private static long getConnectionTimeoutMs(final Map connectionProperties, String driverClassName) { // TODO: the usage of CONNECT_TIMEOUT is Postgres specific, may need to extend for other databases - final String pgPropertyConnectTimeout = CONNECT_TIMEOUT.getName(); - return (connectionProperties.containsKey(pgPropertyConnectTimeout) - && (Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout)) > 0)) - ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout))).toMillis() - // If the PGProperty.CONNECT_TIMEOUT was set by the user, then take its value, if not take the - // default - : driverClassName.equals(DatabaseDriver.POSTGRESQL.getDriverClassName()) - ? Duration.ofSeconds(Long.parseLong(Objects.requireNonNull(CONNECT_TIMEOUT.getDefaultValue()))).toMillis() - : CONNECT_TIMEOUT_DEFAULT.toMillis(); + + if (driverClassName.equals(DatabaseDriver.POSTGRESQL.getDriverClassName())) { + final String pgPropertyConnectTimeout = CONNECT_TIMEOUT.getName(); + // If the PGProperty.CONNECT_TIMEOUT was set by the user, then take its value, if not take the + // default + return (connectionProperties.containsKey(pgPropertyConnectTimeout) + && (Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout)) > 0)) + ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout))).toMillis() + : Duration.ofSeconds(Long.parseLong(Objects.requireNonNull(CONNECT_TIMEOUT.getDefaultValue()))).toMillis(); + + } else { + return CONNECT_TIMEOUT_DEFAULT.toMillis(); + } } public DataSourceBuilder withConnectionProperties(final Map connectionProperties) { diff --git a/docs/integrations/sources/postgres.md b/docs/integrations/sources/postgres.md index 7844f663ea82a..bd8ed2285bd6a 100644 --- a/docs/integrations/sources/postgres.md +++ b/docs/integrations/sources/postgres.md @@ -400,6 +400,7 @@ The root causes is that the WALs needed for the incremental sync has been remove | Version | Date | Pull Request | Subject | |:--------|:-----------|:-------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 1.0.24 | 2022-11-07 | [19291](https://github.com/airbytehq/airbyte/pull/19291) | Use native Postgres connection timeout | | 1.0.23 | 2022-11-07 | [19025](https://github.com/airbytehq/airbyte/pull/19025) | Stop enforce SSL if ssl mode is disabled | | 1.0.22 | 2022-10-31 | [18538](https://github.com/airbytehq/airbyte/pull/18538) | Encode database name | | 1.0.21 | 2022-10-25 | [18256](https://github.com/airbytehq/airbyte/pull/18256) | Disable allow and prefer ssl modes in CDC mode | From a01685200089f0d8e0b85dfaa71c453b359987f9 Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Tue, 15 Nov 2022 12:54:06 +0200 Subject: [PATCH 3/7] updated connection timeout logic and added tests for different datasources creation --- airbyte-db/db-lib/build.gradle | 4 ++ .../airbyte/db/factory/DataSourceFactory.java | 21 ++++++--- .../db/factory/DataSourceFactoryTest.java | 45 +++++++++++++++++-- docs/integrations/sources/postgres.md | 2 +- 4 files changed, 61 insertions(+), 11 deletions(-) diff --git a/airbyte-db/db-lib/build.gradle b/airbyte-db/db-lib/build.gradle index 89e2bbd6d4ea1..331b6ac436308 100644 --- a/airbyte-db/db-lib/build.gradle +++ b/airbyte-db/db-lib/build.gradle @@ -51,6 +51,10 @@ dependencies { // MongoDB implementation 'org.mongodb:mongodb-driver-sync:4.3.0' + + // MySQL + implementation 'mysql:mysql-connector-java:8.0.30' + } task(newConfigsMigration, dependsOn: 'classes', type: JavaExec) { diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java index b213aac821105..e3683a559325e 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java @@ -182,6 +182,7 @@ private static class DataSourceBuilder { private String password; private int port = 5432; private String username; + private static final String CONNECT_TIMEOUT_KEY = "connectTimeout"; private static final Duration CONNECT_TIMEOUT_DEFAULT = Duration.ofSeconds(60); private DataSourceBuilder() {} @@ -208,13 +209,21 @@ private static long getConnectionTimeoutMs(final Map connectionP final String pgPropertyConnectTimeout = CONNECT_TIMEOUT.getName(); // If the PGProperty.CONNECT_TIMEOUT was set by the user, then take its value, if not take the // default - return (connectionProperties.containsKey(pgPropertyConnectTimeout) - && (Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout)) > 0)) - ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout))).toMillis() - : Duration.ofSeconds(Long.parseLong(Objects.requireNonNull(CONNECT_TIMEOUT.getDefaultValue()))).toMillis(); - + if (connectionProperties.containsKey(pgPropertyConnectTimeout) + && (Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout)) >= 0)) { + return Duration.ofSeconds(Long.parseLong(connectionProperties.get(pgPropertyConnectTimeout))).toMillis(); + } else { + return Duration.ofSeconds(Long.parseLong(Objects.requireNonNull(CONNECT_TIMEOUT.getDefaultValue()))).toMillis(); + } + } + final Duration connectionTimeout; + connectionTimeout = + connectionProperties.containsKey(CONNECT_TIMEOUT_KEY) ? Duration.ofSeconds(Long.parseLong(connectionProperties.get(CONNECT_TIMEOUT_KEY))) + : CONNECT_TIMEOUT_DEFAULT; + if (connectionTimeout.getSeconds() == 0) { + return connectionTimeout.toMillis(); } else { - return CONNECT_TIMEOUT_DEFAULT.toMillis(); + return (connectionTimeout.compareTo(CONNECT_TIMEOUT_DEFAULT) > 0 ? connectionTimeout : CONNECT_TIMEOUT_DEFAULT).toMillis(); } } diff --git a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java index 760be9514dd9b..73c8818e5c208 100644 --- a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java +++ b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java @@ -17,6 +17,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.testcontainers.containers.MySQLContainer; /** * Test suite for the {@link DataSourceFactory} class. @@ -58,7 +59,7 @@ void testCreatingDataSourceWithConnectionTimeoutSetAboveDefault() { } @Test - void testCreatingDataSourceWithConnectionTimeoutSetBelowDefault() { + void testCreatingPostgresDataSourceWithConnectionTimeoutSetBelowDefault() { final Map connectionProperties = Map.of( "connectTimeout", "30"); final DataSource dataSource = DataSourceFactory.create( @@ -69,7 +70,25 @@ void testCreatingDataSourceWithConnectionTimeoutSetBelowDefault() { connectionProperties); assertNotNull(dataSource); assertEquals(HikariDataSource.class, dataSource.getClass()); - assertEquals(60000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + assertEquals(30000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + } + + @Test + void testCreatingMySQLDataSourceWithConnectionTimeoutSetBelowDefault() { + try (MySQLContainer mySQLContainer = new MySQLContainer<>("mysql:8.0")) { + mySQLContainer.start(); + final Map connectionProperties = Map.of( + "connectTimeout", "30"); + final DataSource dataSource = DataSourceFactory.create( + mySQLContainer.getUsername(), + mySQLContainer.getPassword(), + mySQLContainer.getDriverClassName(), + mySQLContainer.getJdbcUrl(), + connectionProperties); + assertNotNull(dataSource); + assertEquals(HikariDataSource.class, dataSource.getClass()); + assertEquals(60000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + } } @Test @@ -88,7 +107,7 @@ void testCreatingDataSourceWithConnectionTimeoutSetWithZero() { } @Test - void testCreatingDataSourceWithConnectionTimeoutNotSet() { + void testCreatingPostgresDataSourceWithConnectionTimeoutNotSet() { final Map connectionProperties = Map.of(); final DataSource dataSource = DataSourceFactory.create( username, @@ -98,7 +117,25 @@ void testCreatingDataSourceWithConnectionTimeoutNotSet() { connectionProperties); assertNotNull(dataSource); assertEquals(HikariDataSource.class, dataSource.getClass()); - assertEquals(60000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + assertEquals(10000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + } + + @Test + void testCreatingMySQLDataSourceWithConnectionTimeoutNotSet() { + try (MySQLContainer mySQLContainer = new MySQLContainer<>("mysql:8.0")) { + mySQLContainer.start(); + final Map connectionProperties = Map.of(); + final DataSource dataSource = DataSourceFactory.create( + mySQLContainer.getUsername(), + mySQLContainer.getPassword(), + mySQLContainer.getDriverClassName(), + mySQLContainer.getJdbcUrl(), + connectionProperties); + assertNotNull(dataSource); + assertEquals(HikariDataSource.class, dataSource.getClass()); + assertEquals(60000, ((HikariDataSource) dataSource).getHikariConfigMXBean().getConnectionTimeout()); + } + } @Test diff --git a/docs/integrations/sources/postgres.md b/docs/integrations/sources/postgres.md index bd8ed2285bd6a..c877134cf4385 100644 --- a/docs/integrations/sources/postgres.md +++ b/docs/integrations/sources/postgres.md @@ -400,7 +400,7 @@ The root causes is that the WALs needed for the incremental sync has been remove | Version | Date | Pull Request | Subject | |:--------|:-----------|:-------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 1.0.24 | 2022-11-07 | [19291](https://github.com/airbytehq/airbyte/pull/19291) | Use native Postgres connection timeout | +| 1.0.24 | 2022-11-07 | [19291](https://github.com/airbytehq/airbyte/pull/19291) | Default timeout is reduced from 1 min to 10sec | | 1.0.23 | 2022-11-07 | [19025](https://github.com/airbytehq/airbyte/pull/19025) | Stop enforce SSL if ssl mode is disabled | | 1.0.22 | 2022-10-31 | [18538](https://github.com/airbytehq/airbyte/pull/18538) | Encode database name | | 1.0.21 | 2022-10-25 | [18256](https://github.com/airbytehq/airbyte/pull/18256) | Disable allow and prefer ssl modes in CDC mode | From 7df7e834263e2a2cbc1418acaecee842de7b4e7f Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Wed, 16 Nov 2022 12:29:10 +0200 Subject: [PATCH 4/7] fixed pmd --- .../io/airbyte/db/factory/DataSourceFactoryTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java index 73c8818e5c208..11ee2e47c99fa 100644 --- a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java +++ b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java @@ -23,6 +23,7 @@ * Test suite for the {@link DataSourceFactory} class. */ class DataSourceFactoryTest extends CommonFactoryTest { + private static final String CONNECT_TIMEOUT = "connectTimeout"; static String database; static String driverClassName; @@ -46,7 +47,7 @@ static void setup() { @Test void testCreatingDataSourceWithConnectionTimeoutSetAboveDefault() { final Map connectionProperties = Map.of( - "connectTimeout", "61"); + CONNECT_TIMEOUT, "61"); final DataSource dataSource = DataSourceFactory.create( username, password, @@ -61,7 +62,7 @@ void testCreatingDataSourceWithConnectionTimeoutSetAboveDefault() { @Test void testCreatingPostgresDataSourceWithConnectionTimeoutSetBelowDefault() { final Map connectionProperties = Map.of( - "connectTimeout", "30"); + CONNECT_TIMEOUT, "30"); final DataSource dataSource = DataSourceFactory.create( username, password, @@ -78,7 +79,7 @@ void testCreatingMySQLDataSourceWithConnectionTimeoutSetBelowDefault() { try (MySQLContainer mySQLContainer = new MySQLContainer<>("mysql:8.0")) { mySQLContainer.start(); final Map connectionProperties = Map.of( - "connectTimeout", "30"); + CONNECT_TIMEOUT, "30"); final DataSource dataSource = DataSourceFactory.create( mySQLContainer.getUsername(), mySQLContainer.getPassword(), @@ -94,7 +95,7 @@ void testCreatingMySQLDataSourceWithConnectionTimeoutSetBelowDefault() { @Test void testCreatingDataSourceWithConnectionTimeoutSetWithZero() { final Map connectionProperties = Map.of( - "connectTimeout", "0"); + CONNECT_TIMEOUT, "0"); final DataSource dataSource = DataSourceFactory.create( username, password, From 3b6e70b8413ac89eda53859b32d8bb79e559c37b Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Wed, 16 Nov 2022 12:32:44 +0200 Subject: [PATCH 5/7] refactoring --- .../src/main/java/io/airbyte/db/factory/DataSourceFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java index e3683a559325e..f6a0280502e66 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/factory/DataSourceFactory.java @@ -204,7 +204,6 @@ private DataSourceBuilder() {} */ private static long getConnectionTimeoutMs(final Map connectionProperties, String driverClassName) { // TODO: the usage of CONNECT_TIMEOUT is Postgres specific, may need to extend for other databases - if (driverClassName.equals(DatabaseDriver.POSTGRESQL.getDriverClassName())) { final String pgPropertyConnectTimeout = CONNECT_TIMEOUT.getName(); // If the PGProperty.CONNECT_TIMEOUT was set by the user, then take its value, if not take the From 559d275955cba47d46bea93b29cdd50eb92d0e87 Mon Sep 17 00:00:00 2001 From: vmaltsev Date: Wed, 16 Nov 2022 17:45:10 +0200 Subject: [PATCH 6/7] bump version --- .../io/airbyte/db/factory/DataSourceFactoryTest.java | 9 +++++---- .../connectors/source-postgres-strict-encrypt/Dockerfile | 2 +- .../connectors/source-postgres/Dockerfile | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java index 11ee2e47c99fa..c23fac22a54ad 100644 --- a/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java +++ b/airbyte-db/db-lib/src/test/java/io/airbyte/db/factory/DataSourceFactoryTest.java @@ -23,6 +23,7 @@ * Test suite for the {@link DataSourceFactory} class. */ class DataSourceFactoryTest extends CommonFactoryTest { + private static final String CONNECT_TIMEOUT = "connectTimeout"; static String database; @@ -47,7 +48,7 @@ static void setup() { @Test void testCreatingDataSourceWithConnectionTimeoutSetAboveDefault() { final Map connectionProperties = Map.of( - CONNECT_TIMEOUT, "61"); + CONNECT_TIMEOUT, "61"); final DataSource dataSource = DataSourceFactory.create( username, password, @@ -62,7 +63,7 @@ void testCreatingDataSourceWithConnectionTimeoutSetAboveDefault() { @Test void testCreatingPostgresDataSourceWithConnectionTimeoutSetBelowDefault() { final Map connectionProperties = Map.of( - CONNECT_TIMEOUT, "30"); + CONNECT_TIMEOUT, "30"); final DataSource dataSource = DataSourceFactory.create( username, password, @@ -79,7 +80,7 @@ void testCreatingMySQLDataSourceWithConnectionTimeoutSetBelowDefault() { try (MySQLContainer mySQLContainer = new MySQLContainer<>("mysql:8.0")) { mySQLContainer.start(); final Map connectionProperties = Map.of( - CONNECT_TIMEOUT, "30"); + CONNECT_TIMEOUT, "30"); final DataSource dataSource = DataSourceFactory.create( mySQLContainer.getUsername(), mySQLContainer.getPassword(), @@ -95,7 +96,7 @@ void testCreatingMySQLDataSourceWithConnectionTimeoutSetBelowDefault() { @Test void testCreatingDataSourceWithConnectionTimeoutSetWithZero() { final Map connectionProperties = Map.of( - CONNECT_TIMEOUT, "0"); + CONNECT_TIMEOUT, "0"); final DataSource dataSource = DataSourceFactory.create( username, password, diff --git a/airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile b/airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile index fff90a2cc674e..a04871606d45c 100644 --- a/airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile +++ b/airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile @@ -16,5 +16,5 @@ ENV APPLICATION source-postgres-strict-encrypt COPY --from=build /airbyte /airbyte -LABEL io.airbyte.version=1.0.23 +LABEL io.airbyte.version=1.0.24 LABEL io.airbyte.name=airbyte/source-postgres-strict-encrypt diff --git a/airbyte-integrations/connectors/source-postgres/Dockerfile b/airbyte-integrations/connectors/source-postgres/Dockerfile index fc8ad82a1e2a0..afa914fd449ee 100644 --- a/airbyte-integrations/connectors/source-postgres/Dockerfile +++ b/airbyte-integrations/connectors/source-postgres/Dockerfile @@ -16,5 +16,5 @@ ENV APPLICATION source-postgres COPY --from=build /airbyte /airbyte -LABEL io.airbyte.version=1.0.23 +LABEL io.airbyte.version=1.0.24 LABEL io.airbyte.name=airbyte/source-postgres From bebdfc86f62f03008a937ac976b98df29c1923d6 Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Wed, 16 Nov 2022 17:26:55 +0000 Subject: [PATCH 7/7] auto-bump connector version --- .../resources/seed/source_definitions.yaml | 2 +- .../src/main/resources/seed/source_specs.yaml | 40 ++++--------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index ff57d74c0287e..bafb81f00725f 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1170,7 +1170,7 @@ - name: Postgres sourceDefinitionId: decd338e-5647-4c0b-adf4-da0e75f5a750 dockerRepository: airbyte/source-postgres - dockerImageTag: 1.0.23 + dockerImageTag: 1.0.24 documentationUrl: https://docs.airbyte.com/integrations/sources/postgres icon: postgresql.svg sourceType: database diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index a0d7c36d4104c..c3f9d3dd9cc76 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -10843,7 +10843,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-postgres:1.0.23" +- dockerImage: "airbyte/source-postgres:1.0.24" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/postgres" connectionSpecification: @@ -10933,7 +10933,7 @@ order: 7 oneOf: - title: "disable" - additionalProperties: false + additionalProperties: true description: "Disable SSL." required: - "mode" @@ -10941,12 +10941,9 @@ mode: type: "string" const: "disable" - enum: - - "disable" - default: "disable" order: 0 - title: "allow" - additionalProperties: false + additionalProperties: true description: "Allow SSL mode." required: - "mode" @@ -10954,12 +10951,9 @@ mode: type: "string" const: "allow" - enum: - - "allow" - default: "allow" order: 0 - title: "prefer" - additionalProperties: false + additionalProperties: true description: "Prefer SSL mode." required: - "mode" @@ -10967,12 +10961,9 @@ mode: type: "string" const: "prefer" - enum: - - "prefer" - default: "prefer" order: 0 - title: "require" - additionalProperties: false + additionalProperties: true description: "Require SSL mode." required: - "mode" @@ -10980,12 +10971,9 @@ mode: type: "string" const: "require" - enum: - - "require" - default: "require" order: 0 - title: "verify-ca" - additionalProperties: false + additionalProperties: true description: "Verify-ca SSL mode." required: - "mode" @@ -10994,9 +10982,6 @@ mode: type: "string" const: "verify-ca" - enum: - - "verify-ca" - default: "verify-ca" order: 0 ca_certificate: type: "string" @@ -11027,7 +11012,7 @@ airbyte_secret: true order: 4 - title: "verify-full" - additionalProperties: false + additionalProperties: true description: "Verify-full SSL mode." required: - "mode" @@ -11036,9 +11021,6 @@ mode: type: "string" const: "verify-full" - enum: - - "verify-full" - default: "verify-full" order: 0 ca_certificate: type: "string" @@ -11083,9 +11065,6 @@ method: type: "string" const: "Standard" - enum: - - "Standard" - default: "Standard" order: 0 - title: "Logical Replication (CDC)" description: "Logical replication uses the Postgres write-ahead log (WAL)\ @@ -11101,9 +11080,6 @@ method: type: "string" const: "CDC" - enum: - - "CDC" - default: "CDC" order: 0 plugin: type: "string" @@ -11116,7 +11092,7 @@ enum: - "pgoutput" - "wal2json" - default: "pgoutput" + const: "pgoutput" order: 1 replication_slot: type: "string"