Skip to content

Commit 09566d9

Browse files
sherifnadagl-pix
authored andcommitted
🐛 Fix Oracle spec to declare sid instead of database param, Redshift to allow additionalProperties, MSSQL test and spec to declare spec type correctly (#4874)
1 parent 768aad0 commit 09566d9

File tree

16 files changed

+46
-18
lines changed

16 files changed

+46
-18
lines changed

airbyte-config/init/src/main/resources/config/STANDARD_DESTINATION_DEFINITION/3986776d-2319-4de9-8af8-db14c0996e72.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"destinationDefinitionId": "3986776d-2319-4de9-8af8-db14c0996e72",
33
"name": "Oracle (Alpha)",
44
"dockerRepository": "airbyte/destination-oracle",
5-
"dockerImageTag": "0.1.1",
5+
"dockerImageTag": "0.1.2",
66
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/oracle"
77
}

airbyte-config/init/src/main/resources/config/STANDARD_DESTINATION_DEFINITION/d4353156-9217-4cad-8dd7-c108fd4f74cf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"destinationDefinitionId": "d4353156-9217-4cad-8dd7-c108fd4f74cf",
33
"name": "MS SQL Server",
44
"dockerRepository": "airbyte/destination-mssql",
5-
"dockerImageTag": "0.1.4",
5+
"dockerImageTag": "0.1.5",
66
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/mssql"
77
}

airbyte-config/init/src/main/resources/config/STANDARD_DESTINATION_DEFINITION/f7a7d195-377f-cf5b-70a5-be6b819019dc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"destinationDefinitionId": "f7a7d195-377f-cf5b-70a5-be6b819019dc",
33
"name": "Redshift",
44
"dockerRepository": "airbyte/destination-redshift",
5-
"dockerImageTag": "0.3.10",
5+
"dockerImageTag": "0.3.11",
66
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/redshift",
77
"icon": "redshift.svg"
88
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
- destinationDefinitionId: f7a7d195-377f-cf5b-70a5-be6b819019dc
4848
name: Redshift
4949
dockerRepository: airbyte/destination-redshift
50-
dockerImageTag: 0.3.10
50+
dockerImageTag: 0.3.11
5151
documentationUrl: https://docs.airbyte.io/integrations/destinations/redshift
5252
icon: redshift.svg
5353
- destinationDefinitionId: af7c921e-5892-4ff2-b6c1-4a5ab258fb7e
@@ -63,10 +63,10 @@
6363
- destinationDefinitionId: d4353156-9217-4cad-8dd7-c108fd4f74cf
6464
name: MS SQL Server
6565
dockerRepository: airbyte/destination-mssql
66-
dockerImageTag: 0.1.4
66+
dockerImageTag: 0.1.5
6767
documentationUrl: https://docs.airbyte.io/integrations/destinations/mssql
6868
- destinationDefinitionId: 3986776d-2319-4de9-8af8-db14c0996e72
6969
name: Oracle (Alpha)
7070
dockerRepository: airbyte/destination-oracle
71-
dockerImageTag: 0.1.1
71+
dockerImageTag: 0.1.2
7272
documentationUrl: https://docs.airbyte.io/integrations/destinations/oracle

airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/base/IntegrationRunner.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import io.airbyte.commons.io.IOs;
3131
import io.airbyte.commons.json.Jsons;
3232
import io.airbyte.commons.util.AutoCloseableIterator;
33+
import io.airbyte.protocol.models.AirbyteConnectionStatus;
3334
import io.airbyte.protocol.models.AirbyteMessage;
3435
import io.airbyte.protocol.models.AirbyteMessage.Type;
3536
import io.airbyte.protocol.models.ConfiguredAirbyteCatalog;
@@ -104,7 +105,20 @@ public void run(String[] args) throws Exception {
104105
case SPEC -> outputRecordCollector.accept(new AirbyteMessage().withType(Type.SPEC).withSpec(integration.spec()));
105106
case CHECK -> {
106107
final JsonNode config = parseConfig(parsed.getConfigPath());
107-
validateConfig(integration.spec().getConnectionSpecification(), config, "CHECK");
108+
try {
109+
validateConfig(integration.spec().getConnectionSpecification(), config, "CHECK");
110+
} catch (Exception e) {
111+
// if validation fails don't throw an exception, return a failed connection check message
112+
outputRecordCollector
113+
.accept(
114+
new AirbyteMessage()
115+
.withType(Type.CONNECTION_STATUS)
116+
.withConnectionStatus(
117+
new AirbyteConnectionStatus()
118+
.withStatus(AirbyteConnectionStatus.Status.FAILED)
119+
.withMessage(e.getMessage())));
120+
}
121+
108122
outputRecordCollector.accept(new AirbyteMessage().withType(Type.CONNECTION_STATUS).withConnectionStatus(integration.check(config)));
109123
}
110124
// source only

airbyte-integrations/connectors/destination-mssql/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
88

99
RUN tar xf ${APPLICATION}.tar --strip-components=1
1010

11-
LABEL io.airbyte.version=0.1.4
11+
LABEL io.airbyte.version=0.1.5
1212
LABEL io.airbyte.name=airbyte/destination-mssql

airbyte-integrations/connectors/destination-mssql/src/main/resources/spec.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"additionalProperties": false,
6666
"description": "Data transfer will not be encrypted.",
6767
"required": ["ssl_method"],
68+
"type": "object",
6869
"properties": {
6970
"ssl_method": {
7071
"type": "string",
@@ -78,6 +79,7 @@
7879
"additionalProperties": false,
7980
"description": "Use the cert provided by the server without verification. (For testing purposes only!)",
8081
"required": ["ssl_method"],
82+
"type": "object",
8183
"properties": {
8284
"ssl_method": {
8385
"type": "string",
@@ -91,6 +93,7 @@
9193
"additionalProperties": false,
9294
"description": "Verify and use the cert provided by the server.",
9395
"required": ["ssl_method", "trustStoreName", "trustStorePassword"],
96+
"type": "object",
9497
"properties": {
9598
"ssl_method": {
9699
"type": "string",

airbyte-integrations/connectors/destination-mssql/src/test-integration/java/io/airbyte/integrations/destination/mssql/MSSQLDestinationAcceptanceTestSSL.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ protected boolean supportsDBT() {
6565
}
6666

6767
private JsonNode getConfig(MSSQLServerContainer<?> db) {
68+
6869
return Jsons.jsonNode(ImmutableMap.builder()
6970
.put("host", db.getHost())
7071
.put("port", db.getFirstMappedPort())
7172
.put("username", db.getUsername())
7273
.put("password", db.getPassword())
7374
.put("schema", "testSchema")
74-
.put("ssl_method", "encrypted_trust_server_certificate")
75+
.put("ssl_method", Jsons.jsonNode(ImmutableMap.of("ssl_method", "encrypted_trust_server_certificate")))
7576
.build());
7677
}
7778

airbyte-integrations/connectors/destination-oracle/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
88

99
RUN tar xf ${APPLICATION}.tar --strip-components=1
1010

11-
LABEL io.airbyte.version=0.1.1
11+
LABEL io.airbyte.version=0.1.2
1212
LABEL io.airbyte.name=airbyte/destination-oracle

airbyte-integrations/connectors/destination-oracle/src/main/resources/spec.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"$schema": "http://json-schema.org/draft-07/schema#",
99
"title": "Oracle Destination Spec",
1010
"type": "object",
11-
"required": ["host", "port", "username", "database"],
11+
"required": ["host", "port", "username", "sid"],
1212
"additionalProperties": false,
1313
"properties": {
1414
"host": {
@@ -27,9 +27,9 @@
2727
"examples": ["1521"],
2828
"order": 1
2929
},
30-
"database": {
31-
"title": "DB Name",
32-
"description": "Name of the database.",
30+
"sid": {
31+
"title": "SID",
32+
"description": "SID",
3333
"type": "string",
3434
"order": 2
3535
},

airbyte-integrations/connectors/destination-redshift/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
88

99
RUN tar xf ${APPLICATION}.tar --strip-components=1
1010

11-
LABEL io.airbyte.version=0.3.10
11+
LABEL io.airbyte.version=0.3.11
1212
LABEL io.airbyte.name=airbyte/destination-redshift

airbyte-integrations/connectors/destination-redshift/src/main/resources/spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"title": "Redshift Destination Spec",
1010
"type": "object",
1111
"required": ["host", "port", "database", "username", "password", "schema"],
12-
"additionalProperties": false,
12+
"additionalProperties": true,
1313
"properties": {
1414
"host": {
1515
"description": "Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com)",

airbyte-integrations/connectors/destination-snowflake/src/main/resources/spec.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"username",
1818
"password"
1919
],
20-
2120
"additionalProperties": false,
2221
"properties": {
2322
"host": {

docs/integrations/destinations/mssql.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ You should now have all the requirements needed to configure SQL Server as a des
7575

7676
| Version | Date | Pull Request | Subject |
7777
| :------ | :-------- | :----- | :------ |
78+
| 0.1.5 | 2021-07-20 | [4874](https://github.com/airbytehq/airbyte/pull/4874) | declare object types correctly in spec |
7879
| 0.1.4 | 2021-06-17 | [3744](https://github.com/airbytehq/airbyte/pull/3744) | Fix doc/params in specification file |
7980
| 0.1.3 | 2021-05-28 | [3728](https://github.com/airbytehq/airbyte/pull/3973) | Change dockerfile entrypoint |
8081
| 0.1.2 | 2021-05-13 | [3367](https://github.com/airbytehq/airbyte/pull/3671) | Fix handle symbols unicode |

docs/integrations/destinations/oracle.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@ You should now have all the requirements needed to configure Oracle as a destina
4848
* **Port**
4949
* **Username**
5050
* **Password**
51-
* **Database**
51+
* **Database**
52+
53+
## Changelog
54+
| Version | Date | Pull Request | Subject |
55+
| :--- | :--- | :--- | :--- |
56+
| 0.1.2 | 2021-07-20 | [4874](https://github.com/airbytehq/airbyte/pull/4874) | Require `sid` instead of `database` in connector specification |

docs/integrations/destinations/redshift.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,8 @@ Redshift specifies a maximum limit of 65535 bytes to store the raw JSON record d
103103

104104
See [docs](https://docs.aws.amazon.com/redshift/latest/dg/r_Character_types.html)
105105

106+
## Changelog
107+
108+
| Version | Date | Pull Request | Subject |
109+
| :------ | :-------- | :----- | :------ |
110+
| 0.3.11 | 2021-07-20 | [4874](https://github.com/airbytehq/airbyte/pull/4874) | allow `additionalProperties` in connector spec |

0 commit comments

Comments
 (0)