Skip to content

Commit

Permalink
source-db2: adopt CDK 0.20.4 (#35233)
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Feb 14, 2024
1 parent 3b5ecfc commit 9a6dbac
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
19 changes: 2 additions & 17 deletions airbyte-integrations/connectors/source-db2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
plugins {
id 'application'
id 'airbyte-java-connector'
}

airbyteJavaConnector {
cdkVersionRequired = '0.13.2'
cdkVersionRequired = '0.20.4'
features = ['db-sources']
useLocalCdk = false
}

//remove once upgrading the CDK version to 0.4.x or later
java {
compileTestJava {
options.compilerArgs.remove("-Werror")
}
compileJava {
options.compilerArgs.remove("-Werror")
}
}

airbyteJavaConnector.addCdkDependencies()

application {
mainClass = 'io.airbyte.integrations.source.db2.Db2Source'
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
Expand All @@ -30,7 +17,5 @@ dependencies {

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

testImplementation libs.testcontainers.db2

integrationTestJavaImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'org.testcontainers:db2:1.19.4'
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-db2/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: 447e0381-3780-4b46-bb62-00a4e3c8b8e2
dockerImageTag: 0.2.1
dockerImageTag: 0.2.2
dockerRepository: airbyte/source-db2
githubIssueLabel: source-db2
icon: db2.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public Set<String> getExcludedInternalNameSpaces() {
}

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

private static void runProcess(final String cmd, final Runtime run) throws IOException, InterruptedException {
final Process pr = run.exec(cmd);
final Process pr = run.exec(cmd.split(" "));
if (!pr.waitFor(30, TimeUnit.SECONDS)) {
pr.destroy();
throw new RuntimeException("Timeout while executing: " + cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ protected JsonNode getConfig() throws Exception {

@Override
protected void tearDown(final TestDestinationEnv testEnv) {
dslContext.close();
container.close();
}

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/db2.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ You can also enter your own password for the keystore, but if you don't, the pas

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

0 comments on commit 9a6dbac

Please sign in to comment.