Skip to content

Commit 61336f7

Browse files
subodh1810octavia-squidington-iii
authored andcommitted
fix-postgres-cdc-npe:do not put null in properties (#24271)
* fix-postgres-cdc-npe:do not put null in properties * version bump + change log * auto-bump connector version * manual bump --------- Co-authored-by: Octavia Squidington III <[email protected]>
1 parent ca057a2 commit 61336f7

File tree

10 files changed

+20
-14
lines changed

10 files changed

+20
-14
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- name: AlloyDB for PostgreSQL
4646
sourceDefinitionId: 1fa90628-2b9e-11ed-a261-0242ac120002
4747
dockerRepository: airbyte/source-alloydb
48-
dockerImageTag: 2.0.3
48+
dockerImageTag: 2.0.6
4949
documentationUrl: https://docs.airbyte.com/integrations/sources/alloydb
5050
icon: alloydb.svg
5151
sourceType: database
@@ -1562,7 +1562,7 @@
15621562
- name: Postgres
15631563
sourceDefinitionId: decd338e-5647-4c0b-adf4-da0e75f5a750
15641564
dockerRepository: airbyte/source-postgres
1565-
dockerImageTag: 2.0.5
1565+
dockerImageTag: 2.0.6
15661566
documentationUrl: https://docs.airbyte.com/integrations/sources/postgres
15671567
icon: postgresql.svg
15681568
sourceType: database

airbyte-config/init/src/main/resources/seed/source_specs.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@
370370
supportsNormalization: false
371371
supportsDBT: false
372372
supported_destination_sync_modes: []
373-
- dockerImage: "airbyte/source-alloydb:2.0.3"
373+
- dockerImage: "airbyte/source-alloydb:2.0.6"
374374
spec:
375375
documentationUrl: "https://docs.airbyte.com/integrations/sources/postgres"
376376
connectionSpecification:
@@ -11915,7 +11915,7 @@
1191511915
supportsNormalization: false
1191611916
supportsDBT: false
1191711917
supported_destination_sync_modes: []
11918-
- dockerImage: "airbyte/source-postgres:2.0.5"
11918+
- dockerImage: "airbyte/source-postgres:2.0.6"
1191911919
spec:
1192011920
documentationUrl: "https://docs.airbyte.com/integrations/sources/postgres"
1192111921
connectionSpecification:

airbyte-integrations/bases/debezium/src/main/java/io/airbyte/integrations/debezium/internals/PostgresReplicationConnection.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ public class PostgresReplicationConnection {
2828
public static Connection createConnection(final JsonNode jdbcConfig) throws SQLException, IllegalStateException {
2929
try {
3030
Properties properties = new Properties();
31-
properties.setProperty("user", jdbcConfig.has(JdbcUtils.USERNAME_KEY) ? jdbcConfig.get(JdbcUtils.USERNAME_KEY).asText()
32-
: null);
33-
properties.setProperty("password", jdbcConfig.has(JdbcUtils.PASSWORD_KEY) ? jdbcConfig.get(JdbcUtils.PASSWORD_KEY).asText()
34-
: null);
31+
if (jdbcConfig.has(JdbcUtils.USERNAME_KEY)) {
32+
properties.setProperty("user", jdbcConfig.get(JdbcUtils.USERNAME_KEY).asText());
33+
}
34+
35+
if (jdbcConfig.has(JdbcUtils.PASSWORD_KEY)) {
36+
properties.setProperty("password", jdbcConfig.get(JdbcUtils.PASSWORD_KEY).asText());
37+
}
38+
3539
properties.setProperty("assumeMinServerVersion", "9.4");
3640
properties.setProperty("ApplicationName", "Airbyte Debezium Streaming");
3741
properties.setProperty("replication", "database");

airbyte-integrations/connectors/source-alloydb-strict-encrypt/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-alloydb-strict-encrypt
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=2.0.3
19+
LABEL io.airbyte.version=2.0.6
2020
LABEL io.airbyte.name=airbyte/source-alloydb-strict-encrypt

airbyte-integrations/connectors/source-alloydb/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-alloydb
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=2.0.3
19+
LABEL io.airbyte.version=2.0.6
2020
LABEL io.airbyte.name=airbyte/source-alloydb

airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-postgres-strict-encrypt
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=2.0.5
19+
LABEL io.airbyte.version=2.0.6
2020
LABEL io.airbyte.name=airbyte/source-postgres-strict-encrypt

airbyte-integrations/connectors/source-postgres/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-postgres
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=2.0.5
19+
LABEL io.airbyte.version=2.0.6
2020
LABEL io.airbyte.name=airbyte/source-postgres

connectors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| **Adjust** | <img alt="Adjust icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/adjust.svg" height="30" height="30"/> | Source | airbyte/source-adjust:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/adjust) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-adjust) | <small>`d3b7fa46-111b-419a-998a-d7f046f6d66d`</small> |
1010
| **Aha** | <img alt="Aha icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/aha.svg" height="30" height="30"/> | Source | airbyte/source-aha:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/aha) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-aha) | <small>`81ca39dc-4534-4dd2-b848-b0cfd2c11fce`</small> |
1111
| **Airtable** | <img alt="Airtable icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/airtable.svg" height="30" height="30"/> | Source | airbyte/source-airtable:3.0.0 | beta | [link](https://docs.airbyte.com/integrations/sources/airtable) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-airtable) | <small>`14c6e7ea-97ed-4f5e-a7b5-25e9a80b8212`</small> |
12-
| **AlloyDB for PostgreSQL** | <img alt="AlloyDB for PostgreSQL icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/alloydb.svg" height="30" height="30"/> | Source | airbyte/source-alloydb:2.0.3 | generally_available | [link](https://docs.airbyte.com/integrations/sources/alloydb) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-alloydb) | <small>`1fa90628-2b9e-11ed-a261-0242ac120002`</small> |
12+
| **AlloyDB for PostgreSQL** | <img alt="AlloyDB for PostgreSQL icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/alloydb.svg" height="30" height="30"/> | Source | airbyte/source-alloydb:2.0.6 | generally_available | [link](https://docs.airbyte.com/integrations/sources/alloydb) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-alloydb) | <small>`1fa90628-2b9e-11ed-a261-0242ac120002`</small> |
1313
| **Alpha Vantage** | <img alt="Alpha Vantage icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/alpha-vantage.svg" height="30" height="30"/> | Source | airbyte/source-alpha-vantage:0.1.1 | alpha | [link](https://docs.airbyte.com/integrations/sources/alpha-vantage) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-alpha-vantage) | <small>`db385323-9333-4fec-bec3-9e0ca9326c90`</small> |
1414
| **Amazon Ads** | <img alt="Amazon Ads icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/amazonads.svg" height="30" height="30"/> | Source | airbyte/source-amazon-ads:1.0.1 | generally_available | [link](https://docs.airbyte.com/integrations/sources/amazon-ads) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-amazon-ads) | <small>`c6b0a29e-1da9-4512-9002-7bfd0cba2246`</small> |
1515
| **Amazon SQS** | <img alt="Amazon SQS icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/awssqs.svg" height="30" height="30"/> | Source | airbyte/source-amazon-sqs:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/amazon-sqs) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-amazon-sqs) | <small>`983fd355-6bf3-4709-91b5-37afa391eeb6`</small> |
@@ -178,7 +178,7 @@
178178
| **PokeAPI** | <img alt="PokeAPI icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/pokeapi.svg" height="30" height="30"/> | Source | airbyte/source-pokeapi:0.1.5 | alpha | [link](https://docs.airbyte.com/integrations/sources/pokeapi) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-pokeapi) | <small>`6371b14b-bc68-4236-bfbd-468e8df8e968`</small> |
179179
| **Polygon Stock API** | <img alt="Polygon Stock API icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/polygon.svg" height="30" height="30"/> | Source | airbyte/source-polygon-stock-api:0.1.1 | alpha | [link](https://docs.airbyte.com/integrations/sources/polygon-stock-api) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-polygon-stock-api) | <small>`5807d72f-0abc-49f9-8fa5-ae820007032b`</small> |
180180
| **PostHog** | <img alt="PostHog icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/posthog.svg" height="30" height="30"/> | Source | airbyte/source-posthog:0.1.8 | beta | [link](https://docs.airbyte.com/integrations/sources/posthog) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-posthog) | <small>`af6d50ee-dddf-4126-a8ee-7faee990774f`</small> |
181-
| **Postgres** | <img alt="Postgres icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/postgresql.svg" height="30" height="30"/> | Source | airbyte/source-postgres:2.0.5 | generally_available | [link](https://docs.airbyte.com/integrations/sources/postgres) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-postgres) | <small>`decd338e-5647-4c0b-adf4-da0e75f5a750`</small> |
181+
| **Postgres** | <img alt="Postgres icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/postgresql.svg" height="30" height="30"/> | Source | airbyte/source-postgres:2.0.6 | generally_available | [link](https://docs.airbyte.com/integrations/sources/postgres) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-postgres) | <small>`decd338e-5647-4c0b-adf4-da0e75f5a750`</small> |
182182
| **Postmark App** | <img alt="Postmark App icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/postmark.svg" height="30" height="30"/> | Source | airbyte/source-postmarkapp:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/postmarkapp) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-postmarkapp) | <small>`cde75ca1-1e28-4a0f-85bb-90c546de9f1f`</small> |
183183
| **PrestaShop** | <img alt="PrestaShop icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/prestashop.svg" height="30" height="30"/> | Source | airbyte/source-prestashop:0.3.1 | beta | [link](https://docs.airbyte.com/integrations/sources/prestashop) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-prestashop) | <small>`d60a46d4-709f-4092-a6b7-2457f7d455f5`</small> |
184184
| **Primetric** | <img alt="Primetric icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/primetric.svg" height="30" height="30"/> | Source | airbyte/source-primetric:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/primetric) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-primetric) | <small>`f636c3c6-4077-45ac-b109-19fc62a283c1`</small> |

docs/integrations/sources/alloydb.md

+1
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ According to Postgres [documentation](https://www.postgresql.org/docs/14/datatyp
321321

322322
| Version | Date | Pull Request | Subject |
323323
|:--------|:-----------|:----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|
324+
| 2.0.6 | 2022-03-21 | [24271](https://github.com/airbytehq/airbyte/pull/24271) | Fix NPE in CDC mode |
324325
| 2.0.3 | 2023-03-21 | [24147](https://github.com/airbytehq/airbyte/pull/24275) | Fix error with CDC checkpointing |
325326
| 2.0.2 | 2022-03-13 | [23112](https://github.com/airbytehq/airbyte/pull/21727) | Add state checkpointing for CDC sync. |
326327
| 2.0.1 | 2023-03-08 | [23596](https://github.com/airbytehq/airbyte/pull/23596) | For network isolation, source connector accepts a list of hosts it is allowed to connect |

docs/integrations/sources/postgres.md

+1
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ The root causes is that the WALs needed for the incremental sync has been remove
396396

397397
| Version | Date | Pull Request | Subject |
398398
|:--------|:-----------|:----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
399+
| 2.0.6 | 2022-03-21 | [24271](https://github.com/airbytehq/airbyte/pull/24271) | Fix NPE in CDC mode |
399400
| 2.0.5 | 2022-03-21 | [21533](https://github.com/airbytehq/airbyte/pull/21533) | Add integration with datadog |
400401
| 2.0.4 | 2023-03-21 | [24147](https://github.com/airbytehq/airbyte/pull/24275) | Fix error with CDC checkpointing |
401402
| 2.0.3 | 2023-03-14 | [24000](https://github.com/airbytehq/airbyte/pull/24000) | Removed check method call on read. |

0 commit comments

Comments
 (0)