Skip to content

Commit a610ad8

Browse files
authored
bump drivers and cdk to latest (#51596)
1 parent d4b6efc commit a610ad8

File tree

8 files changed

+37
-12
lines changed

8 files changed

+37
-12
lines changed

airbyte-cdk/java/airbyte-cdk/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ corresponds to that version.
174174

175175
| Version | Date | Pull Request | Subject |
176176
|:-----------|:-----------|:------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
177+
| 0.48.6 | 2025-01-26 | [\#51596](https://github.com/airbytehq/airbyte/pull/51596) | Fix flaky source mssql tests |
177178
| 0.48.5 | 2025-01-16 | [\#51583](https://github.com/airbytehq/airbyte/pull/51583) | Also save SSL key to /tmp in destination-postgres |
178179
| 0.48.4 | 2024-12-24 | [\#50410](https://github.com/airbytehq/airbyte/pull/50410) | Save SSL key to /tmp |
179180
| 0.48.3 | 2024-12-23 | [\#49858](https://github.com/airbytehq/airbyte/pull/49858) | Relax various Destination CDK methods visibility. |
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.48.5
1+
version=0.48.6

airbyte-integrations/connectors/source-mssql/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
airbyteJavaConnector {
6-
cdkVersionRequired = '0.45.1'
6+
cdkVersionRequired = '0.48.6'
77
features = ['db-sources']
88
useLocalCdk = false
99
}
@@ -24,9 +24,9 @@ application {
2424
}
2525

2626
dependencies {
27-
implementation 'com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11'
28-
implementation 'io.debezium:debezium-embedded:2.7.1.Final'
29-
implementation 'io.debezium:debezium-connector-sqlserver:2.6.2.Final'
27+
implementation 'com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11'
28+
implementation 'io.debezium:debezium-embedded:3.0.7.Final'
29+
implementation 'io.debezium:debezium-connector-sqlserver:3.0.7.Final'
3030
implementation 'org.codehaus.plexus:plexus-utils:3.4.2'
3131

3232
testFixturesImplementation 'org.testcontainers:mssqlserver:1.19.0'

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data:
99
connectorSubtype: database
1010
connectorType: source
1111
definitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1
12-
dockerImageTag: 4.1.18
12+
dockerImageTag: 4.1.19
1313
dockerRepository: airbyte/source-mssql
1414
documentationUrl: https://docs.airbyte.com/integrations/sources/mssql
1515
githubIssueLabel: source-mssql

airbyte-integrations/connectors/source-mssql/src/main/java/io/airbyte/integrations/source/mssql/MssqlSource.java

+23-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import com.fasterxml.jackson.databind.JsonNode;
1919
import com.fasterxml.jackson.databind.node.ObjectNode;
20+
import com.google.common.annotations.VisibleForTesting;
2021
import com.google.common.base.Preconditions;
2122
import com.google.common.collect.ImmutableList;
2223
import com.google.common.collect.ImmutableMap;
@@ -42,6 +43,8 @@
4243
import io.airbyte.cdk.integrations.source.relationaldb.state.StateManagerFactory;
4344
import io.airbyte.cdk.integrations.source.relationaldb.streamstatus.StreamStatusTraceEmitterIterator;
4445
import io.airbyte.commons.exceptions.ConfigErrorException;
46+
import io.airbyte.commons.features.EnvVariableFeatureFlags;
47+
import io.airbyte.commons.features.FeatureFlags;
4548
import io.airbyte.commons.functional.CheckedConsumer;
4649
import io.airbyte.commons.json.Jsons;
4750
import io.airbyte.commons.stream.AirbyteStreamStatusHolder;
@@ -102,13 +105,26 @@ SELECT CASE WHEN (SELECT TOP 1 1 FROM "%s"."%s" WHERE "%s" IS NULL)=1 then 1 els
102105
private MssqlInitialLoadStateManager initialLoadStateManager = null;
103106
public static final String JDBC_DELIMITER = ";";
104107
private List<String> schemas;
108+
private int stateEmissionFrequency;
109+
private final FeatureFlags featureFlags;
105110

106111
public static Source sshWrappedSource(final MssqlSource source) {
107112
return new SshWrappedSource(source, JdbcUtils.HOST_LIST_KEY, JdbcUtils.PORT_LIST_KEY);
108113
}
109114

110115
public MssqlSource() {
116+
this(new EnvVariableFeatureFlags());
117+
}
118+
119+
public MssqlSource(final FeatureFlags featureFlags) {
111120
super(DRIVER_CLASS, AdaptiveStreamingQueryConfig::new, new MssqlSourceOperations());
121+
this.featureFlags = featureFlags;
122+
this.stateEmissionFrequency = INTERMEDIATE_STATE_EMISSION_FREQUENCY;
123+
}
124+
125+
@Override
126+
public FeatureFlags getFeatureFlags() {
127+
return featureFlags;
112128
}
113129

114130
@Override
@@ -444,7 +460,12 @@ protected void assertSqlServerAgentRunning(final JdbcDatabase database) throws S
444460

445461
@Override
446462
protected int getStateEmissionFrequency() {
447-
return INTERMEDIATE_STATE_EMISSION_FREQUENCY;
463+
return this.stateEmissionFrequency;
464+
}
465+
466+
@VisibleForTesting
467+
protected void setStateEmissionFrequencyForDebug(final int stateEmissionFrequency) {
468+
this.stateEmissionFrequency = stateEmissionFrequency;
448469
}
449470

450471
@Override
@@ -517,7 +538,7 @@ private void readSsl(final JsonNode sslMethod, final List<String> additionalPara
517538

518539
if (config.has("certificate")) {
519540
String certificate = config.get("certificate").asText();
520-
String password = RandomStringUtils.randomAlphanumeric(100);
541+
String password = RandomStringUtils.secure().nextAlphanumeric(100);
521542
final URI keyStoreUri;
522543
try {
523544
keyStoreUri = SSLCertificateUtils.keyStoreFromCertificate(certificate, password, null, null);

airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CloudDeploymentMssqlTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.google.common.collect.ImmutableMap;
1111
import io.airbyte.cdk.db.jdbc.JdbcUtils;
1212
import io.airbyte.cdk.integrations.base.Source;
13+
import io.airbyte.cdk.integrations.base.adaptive.AdaptiveSourceRunner;
1314
import io.airbyte.cdk.integrations.base.ssh.SshBastionContainer;
1415
import io.airbyte.cdk.integrations.base.ssh.SshTunnel;
1516
import io.airbyte.commons.features.EnvVariableFeatureFlags;
@@ -35,8 +36,8 @@ private MsSQLTestDatabase createTestDatabase(String... containerFactoryMethods)
3536
}
3637

3738
private Source source() {
38-
final var source = new MssqlSource();
39-
source.setFeatureFlags(FeatureFlagsWrapper.overridingDeploymentMode(new EnvVariableFeatureFlags(), "CLOUD"));
39+
final var source = new MssqlSource(FeatureFlagsWrapper.overridingDeploymentMode(
40+
new EnvVariableFeatureFlags(), AdaptiveSourceRunner.CLOUD_MODE));
4041
return MssqlSource.sshWrappedSource(source);
4142
}
4243

airbyte-integrations/connectors/source-mssql/src/testFixtures/java/io/airbyte/integrations/source/mssql/MsSQLTestDatabase.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.io.IOException;
1818
import java.io.UncheckedIOException;
1919
import java.sql.SQLException;
20+
import java.time.Duration;
2021
import java.util.List;
2122
import java.util.Map;
2223
import java.util.Set;
@@ -384,7 +385,7 @@ public MsSQLConfigBuilder withCdcReplication() {
384385
return with("is_test", true)
385386
.with("replication_method", Map.of(
386387
"method", "CDC",
387-
"initial_waiting_seconds", DEFAULT_CDC_REPLICATION_INITIAL_WAIT.getSeconds(),
388+
"initial_waiting_seconds", Duration.ofSeconds(20).getSeconds(),
388389
INVALID_CDC_CURSOR_POSITION_PROPERTY, RESYNC_DATA_OPTION));
389390
}
390391

docs/integrations/sources/mssql.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configura
423423
<summary>Expand to review</summary>
424424

425425
| Version | Date | Pull Request | Subject |
426-
| :------ | :--------- | :---------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- |
426+
|:--------|:-----------| :---------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------|
427+
| 4.1.19 | 2025-01-16 | [51596](https://github.com/airbytehq/airbyte/pull/51596) | Bump driver versions to latest (jdbc, debezium, cdk) |
427428
| 4.1.18 | 2025-01-06 | [50943](https://github.com/airbytehq/airbyte/pull/50943) | Use airbyte/java-connector-base:2.0.0. This makes the image rootless. The connector will be incompatible with Airbyte < 0.64. |
428429
| 4.1.17 | 2024-12-17 | [49840](https://github.com/airbytehq/airbyte/pull/49840) | Use a base image: airbyte/java-connector-base:1.0.0 |
429430
| 4.1.16 | 2024-11-13 | [48484](https://github.com/airbytehq/airbyte/pull/48484) | Enhanced error handling for MSSQL to improve system error detection and response. |

0 commit comments

Comments
 (0)