Skip to content

Commit fea68d7

Browse files
Marius Postajatinyadav-cc
Marius Posta
authored andcommitted
source-db2: adopt CDK 0.20.4 (airbytehq#35233)
1 parent a4d26a7 commit fea68d7

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
plugins {
2-
id 'application'
32
id 'airbyte-java-connector'
43
}
54

65
airbyteJavaConnector {
7-
cdkVersionRequired = '0.13.2'
6+
cdkVersionRequired = '0.20.4'
87
features = ['db-sources']
98
useLocalCdk = false
109
}
1110

12-
//remove once upgrading the CDK version to 0.4.x or later
13-
java {
14-
compileTestJava {
15-
options.compilerArgs.remove("-Werror")
16-
}
17-
compileJava {
18-
options.compilerArgs.remove("-Werror")
19-
}
20-
}
21-
22-
airbyteJavaConnector.addCdkDependencies()
23-
2411
application {
2512
mainClass = 'io.airbyte.integrations.source.db2.Db2Source'
2613
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
@@ -30,7 +17,5 @@ dependencies {
3017

3118
implementation group: 'com.ibm.db2', name: 'jcc', version: '11.5.5.0'
3219

33-
testImplementation libs.testcontainers.db2
34-
35-
integrationTestJavaImplementation 'org.apache.commons:commons-lang3:3.11'
20+
testImplementation 'org.testcontainers:db2:1.19.4'
3621
}

airbyte-integrations/connectors/source-db2/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ data:
55
connectorSubtype: database
66
connectorType: source
77
definitionId: 447e0381-3780-4b46-bb62-00a4e3c8b8e2
8-
dockerImageTag: 0.2.1
8+
dockerImageTag: 0.2.2
99
dockerRepository: airbyte/source-db2
1010
githubIssueLabel: source-db2
1111
icon: db2.svg

airbyte-integrations/connectors/source-db2/src/main/java/io.airbyte.integrations.source.db2/Db2Source.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public Set<String> getExcludedInternalNameSpaces() {
9595
}
9696

9797
@Override
98+
@SuppressWarnings("unchecked")
9899
public Set<JdbcPrivilegeDto> getPrivilegesTableForCurrentUser(final JdbcDatabase database, final String schema) throws SQLException {
99100
try (final Stream<JsonNode> stream = database.unsafeQuery(getPrivileges(), sourceOperations::rowToJson)) {
100101
return stream.map(this::getPrivilegeDto).collect(Collectors.toSet());
@@ -170,7 +171,7 @@ private static void convertAndImportCertificate(final String certificate, final
170171
}
171172

172173
private static void runProcess(final String cmd, final Runtime run) throws IOException, InterruptedException {
173-
final Process pr = run.exec(cmd);
174+
final Process pr = run.exec(cmd.split(" "));
174175
if (!pr.waitFor(30, TimeUnit.SECONDS)) {
175176
pr.destroy();
176177
throw new RuntimeException("Timeout while executing: " + cmd);

airbyte-integrations/connectors/source-db2/src/test-integration/java/io/airbyte/integrations/io/airbyte/integration_tests/sources/Db2SourceDatatypeTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ protected JsonNode getConfig() throws Exception {
4343

4444
@Override
4545
protected void tearDown(final TestDestinationEnv testEnv) {
46-
dslContext.close();
4746
container.close();
4847
}
4948

docs/integrations/sources/db2.md

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ You can also enter your own password for the keystore, but if you don't, the pas
6060

6161
| Version | Date | Pull Request | Subject |
6262
|:--------|:-----------| :--- |:------------------------------------------------------------------------------------------------------------------------------------------|
63+
| 0.2.2 | 2024-02-13 | [35233](https://github.com/airbytehq/airbyte/pull/35233) | Adopt CDK 0.20.4 |
6364
| 0.2.1 | 2024-01-24 | [34453](https://github.com/airbytehq/airbyte/pull/34453) | bump CDK version |
6465
| 0.2.0 | 2023-12-18 | [33485](https://github.com/airbytehq/airbyte/pull/33485) | Remove LEGACY state |
6566
| 0.1.20 | 2023-06-20 | [27212](https://github.com/airbytehq/airbyte/pull/27212) | Fix silent exception swallowing in StreamingJdbcDatabase |

0 commit comments

Comments
 (0)