From 3ffd6298fe00cf5653a13c233a87315b64fe7e95 Mon Sep 17 00:00:00 2001 From: subodh Date: Fri, 4 Nov 2022 13:52:57 +0530 Subject: [PATCH 1/4] mysql-source:tinyint-unsigned should not be identified as boolean --- .../integrations/source/mysql/MySqlSourceOperations.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java b/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java index 2730b68f6b5f9..8590ea970bff8 100644 --- a/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java +++ b/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java @@ -89,7 +89,7 @@ public void setJsonField(final ResultSet resultSet, final int colIndex, final Ob } } case BOOLEAN -> putBoolean(json, columnName, resultSet, colIndex); - case TINYINT, TINYINT_UNSIGNED -> { + case TINYINT -> { if (field.getLength() == 1L) { // TINYINT(1) is boolean putBoolean(json, columnName, resultSet, colIndex); @@ -97,6 +97,7 @@ public void setJsonField(final ResultSet resultSet, final int colIndex, final Ob putShortInt(json, columnName, resultSet, colIndex); } } + case TINYINT_UNSIGNED -> putShortInt(json, columnName, resultSet, colIndex); case SMALLINT, SMALLINT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED -> putInteger(json, columnName, resultSet, colIndex); case INT, INT_UNSIGNED -> { if (field.isUnsigned()) { @@ -184,7 +185,7 @@ public MysqlType getFieldType(final JsonNode field) { switch (literalType) { // BIT(1) and TINYINT(1) are interpreted as boolean - case BIT, TINYINT, TINYINT_UNSIGNED -> { + case BIT, TINYINT -> { if (columnSize == 1) { return MysqlType.BOOLEAN; } From e0d89f8b86b0799361b5e70d4f994a0e8b471647 Mon Sep 17 00:00:00 2001 From: subodh Date: Mon, 14 Nov 2022 13:43:22 +0530 Subject: [PATCH 2/4] upgrade version --- .../connectors/source-mysql-strict-encrypt/Dockerfile | 2 +- airbyte-integrations/connectors/source-mysql/Dockerfile | 2 +- docs/integrations/sources/mysql.md | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/airbyte-integrations/connectors/source-mysql-strict-encrypt/Dockerfile b/airbyte-integrations/connectors/source-mysql-strict-encrypt/Dockerfile index fc05749d57fa9..367d4518cbace 100644 --- a/airbyte-integrations/connectors/source-mysql-strict-encrypt/Dockerfile +++ b/airbyte-integrations/connectors/source-mysql-strict-encrypt/Dockerfile @@ -16,6 +16,6 @@ ENV APPLICATION source-mysql-strict-encrypt COPY --from=build /airbyte /airbyte -LABEL io.airbyte.version=1.0.12 +LABEL io.airbyte.version=1.0.13 LABEL io.airbyte.name=airbyte/source-mysql-strict-encrypt diff --git a/airbyte-integrations/connectors/source-mysql/Dockerfile b/airbyte-integrations/connectors/source-mysql/Dockerfile index 3889a9a1e60a7..6bdb2fa01373d 100644 --- a/airbyte-integrations/connectors/source-mysql/Dockerfile +++ b/airbyte-integrations/connectors/source-mysql/Dockerfile @@ -16,6 +16,6 @@ ENV APPLICATION source-mysql COPY --from=build /airbyte /airbyte -LABEL io.airbyte.version=1.0.12 +LABEL io.airbyte.version=1.0.13 LABEL io.airbyte.name=airbyte/source-mysql diff --git a/docs/integrations/sources/mysql.md b/docs/integrations/sources/mysql.md index bc03813c24077..32b4aac08fe47 100644 --- a/docs/integrations/sources/mysql.md +++ b/docs/integrations/sources/mysql.md @@ -252,8 +252,9 @@ WHERE actor_definition_id ='435bb9a5-7887-4809-aa58-28c27df0d7ad' AND (configura ## Changelog | Version | Date | Pull Request | Subject | |:--------|:-----------|:-----------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------| -| 1.0.12 | 2022-11-07 | [19025](https://github.com/airbytehq/airbyte/pull/19025) | Stop enforce SSL if ssl mode is disabled | -| 1.0.11 | 2022-11-03 | [18851](https://github.com/airbytehq/airbyte/pull/18851) | Fix bug with unencrypted CDC connections | +| 1.0.13 | 2022-11-14 | [18956](https://github.com/airbytehq/airbyte/pull/18956) | Clean up Tinyint Unsigned data type identification | +| 1.0.12 | 2022-11-07 | [19025](https://github.com/airbytehq/airbyte/pull/19025) | Stop enforce SSL if ssl mode is disabled | +| 1.0.11 | 2022-11-03 | [18851](https://github.com/airbytehq/airbyte/pull/18851) | Fix bug with unencrypted CDC connections | | 1.0.10 | 2022-11-02 | [18619](https://github.com/airbytehq/airbyte/pull/18619) | Fix bug with handling Tinyint(1) Unsigned values as boolean | | 1.0.9 | 2022-10-31 | [18538](https://github.com/airbytehq/airbyte/pull/18538) | Encode database name | | 1.0.8 | 2022-10-25 | [18383](https://github.com/airbytehq/airbyte/pull/18383) | Better SSH error handling + messages | From 4b57a49c4b20cedac8e5e7d364138c0ac481d235 Mon Sep 17 00:00:00 2001 From: subodh Date: Mon, 14 Nov 2022 15:35:01 +0530 Subject: [PATCH 3/4] fix encrypted spec --- .../src/test/resources/expected_spec.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/airbyte-integrations/connectors/source-mysql-strict-encrypt/src/test/resources/expected_spec.json b/airbyte-integrations/connectors/source-mysql-strict-encrypt/src/test/resources/expected_spec.json index 870f0a66f303f..c2287b4113154 100644 --- a/airbyte-integrations/connectors/source-mysql-strict-encrypt/src/test/resources/expected_spec.json +++ b/airbyte-integrations/connectors/source-mysql-strict-encrypt/src/test/resources/expected_spec.json @@ -61,8 +61,6 @@ "mode": { "type": "string", "const": "preferred", - "enum": ["preferred"], - "default": "preferred", "order": 0 } } @@ -75,8 +73,6 @@ "mode": { "type": "string", "const": "required", - "enum": ["required"], - "default": "required", "order": 0 } } @@ -89,8 +85,6 @@ "mode": { "type": "string", "const": "verify_ca", - "enum": ["verify_ca"], - "default": "verify_ca", "order": 0 }, "ca_certificate": { @@ -134,8 +128,6 @@ "mode": { "type": "string", "const": "verify_identity", - "enum": ["verify_identity"], - "default": "verify_identity", "order": 0 }, "ca_certificate": { @@ -187,8 +179,6 @@ "method": { "type": "string", "const": "STANDARD", - "enum": ["STANDARD"], - "default": "STANDARD", "order": 0 } } @@ -201,8 +191,6 @@ "method": { "type": "string", "const": "CDC", - "enum": ["CDC"], - "default": "CDC", "order": 0 }, "initial_waiting_seconds": { From f5ea2e7ec61dc350f6c9c085b380a525ea9bdb9c Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Mon, 14 Nov 2022 10:42:31 +0000 Subject: [PATCH 4/4] auto-bump connector version --- .../resources/seed/source_definitions.yaml | 2 +- .../src/main/resources/seed/source_specs.yaml | 20 +------------------ 2 files changed, 2 insertions(+), 20 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 5007a19e9b4cc..a1801918a363e 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -912,7 +912,7 @@ - name: MySQL sourceDefinitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad dockerRepository: airbyte/source-mysql - dockerImageTag: 1.0.12 + dockerImageTag: 1.0.13 documentationUrl: https://docs.airbyte.com/integrations/sources/mysql icon: mysql.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 55377c949a73b..f9fcc1fea4641 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -8341,7 +8341,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-mysql:1.0.12" +- dockerImage: "airbyte/source-mysql:1.0.13" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/mysql" connectionSpecification: @@ -8424,9 +8424,6 @@ mode: type: "string" const: "preferred" - enum: - - "preferred" - default: "preferred" order: 0 - title: "required" description: "Require SSL mode." @@ -8436,9 +8433,6 @@ mode: type: "string" const: "required" - enum: - - "required" - default: "required" order: 0 - title: "Verify CA" description: "Verify CA SSL mode." @@ -8449,9 +8443,6 @@ mode: type: "string" const: "verify_ca" - enum: - - "verify_ca" - default: "verify_ca" order: 0 ca_certificate: type: "string" @@ -8494,9 +8485,6 @@ mode: type: "string" const: "verify_identity" - enum: - - "verify_identity" - default: "verify_identity" order: 0 ca_certificate: type: "string" @@ -8545,9 +8533,6 @@ method: type: "string" const: "STANDARD" - enum: - - "STANDARD" - default: "STANDARD" order: 0 - title: "Logical Replication (CDC)" description: "CDC uses the Binlog to detect inserts, updates, and deletes.\ @@ -8558,9 +8543,6 @@ method: type: "string" const: "CDC" - enum: - - "CDC" - default: "CDC" order: 0 initial_waiting_seconds: type: "integer"