Skip to content

Commit

Permalink
bump drivers and cdk to latest (#51596)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodireich authored Jan 27, 2025
1 parent d4b6efc commit a610ad8
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 12 deletions.
1 change: 1 addition & 0 deletions airbyte-cdk/java/airbyte-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ corresponds to that version.

| Version | Date | Pull Request | Subject |
|:-----------|:-----------|:------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.48.6 | 2025-01-26 | [\#51596](https://github.com/airbytehq/airbyte/pull/51596) | Fix flaky source mssql tests |
| 0.48.5 | 2025-01-16 | [\#51583](https://github.com/airbytehq/airbyte/pull/51583) | Also save SSL key to /tmp in destination-postgres |
| 0.48.4 | 2024-12-24 | [\#50410](https://github.com/airbytehq/airbyte/pull/50410) | Save SSL key to /tmp |
| 0.48.3 | 2024-12-23 | [\#49858](https://github.com/airbytehq/airbyte/pull/49858) | Relax various Destination CDK methods visibility. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.48.5
version=0.48.6
8 changes: 4 additions & 4 deletions airbyte-integrations/connectors/source-mssql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.45.1'
cdkVersionRequired = '0.48.6'
features = ['db-sources']
useLocalCdk = false
}
Expand All @@ -24,9 +24,9 @@ application {
}

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

testFixturesImplementation 'org.testcontainers:mssqlserver:1.19.0'
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mssql/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1
dockerImageTag: 4.1.18
dockerImageTag: 4.1.19
dockerRepository: airbyte/source-mssql
documentationUrl: https://docs.airbyte.com/integrations/sources/mssql
githubIssueLabel: source-mssql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand All @@ -42,6 +43,8 @@
import io.airbyte.cdk.integrations.source.relationaldb.state.StateManagerFactory;
import io.airbyte.cdk.integrations.source.relationaldb.streamstatus.StreamStatusTraceEmitterIterator;
import io.airbyte.commons.exceptions.ConfigErrorException;
import io.airbyte.commons.features.EnvVariableFeatureFlags;
import io.airbyte.commons.features.FeatureFlags;
import io.airbyte.commons.functional.CheckedConsumer;
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.stream.AirbyteStreamStatusHolder;
Expand Down Expand Up @@ -102,13 +105,26 @@ SELECT CASE WHEN (SELECT TOP 1 1 FROM "%s"."%s" WHERE "%s" IS NULL)=1 then 1 els
private MssqlInitialLoadStateManager initialLoadStateManager = null;
public static final String JDBC_DELIMITER = ";";
private List<String> schemas;
private int stateEmissionFrequency;
private final FeatureFlags featureFlags;

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

public MssqlSource() {
this(new EnvVariableFeatureFlags());
}

public MssqlSource(final FeatureFlags featureFlags) {
super(DRIVER_CLASS, AdaptiveStreamingQueryConfig::new, new MssqlSourceOperations());
this.featureFlags = featureFlags;
this.stateEmissionFrequency = INTERMEDIATE_STATE_EMISSION_FREQUENCY;
}

@Override
public FeatureFlags getFeatureFlags() {
return featureFlags;
}

@Override
Expand Down Expand Up @@ -444,7 +460,12 @@ protected void assertSqlServerAgentRunning(final JdbcDatabase database) throws S

@Override
protected int getStateEmissionFrequency() {
return INTERMEDIATE_STATE_EMISSION_FREQUENCY;
return this.stateEmissionFrequency;
}

@VisibleForTesting
protected void setStateEmissionFrequencyForDebug(final int stateEmissionFrequency) {
this.stateEmissionFrequency = stateEmissionFrequency;
}

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

if (config.has("certificate")) {
String certificate = config.get("certificate").asText();
String password = RandomStringUtils.randomAlphanumeric(100);
String password = RandomStringUtils.secure().nextAlphanumeric(100);
final URI keyStoreUri;
try {
keyStoreUri = SSLCertificateUtils.keyStoreFromCertificate(certificate, password, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.google.common.collect.ImmutableMap;
import io.airbyte.cdk.db.jdbc.JdbcUtils;
import io.airbyte.cdk.integrations.base.Source;
import io.airbyte.cdk.integrations.base.adaptive.AdaptiveSourceRunner;
import io.airbyte.cdk.integrations.base.ssh.SshBastionContainer;
import io.airbyte.cdk.integrations.base.ssh.SshTunnel;
import io.airbyte.commons.features.EnvVariableFeatureFlags;
Expand All @@ -35,8 +36,8 @@ private MsSQLTestDatabase createTestDatabase(String... containerFactoryMethods)
}

private Source source() {
final var source = new MssqlSource();
source.setFeatureFlags(FeatureFlagsWrapper.overridingDeploymentMode(new EnvVariableFeatureFlags(), "CLOUD"));
final var source = new MssqlSource(FeatureFlagsWrapper.overridingDeploymentMode(
new EnvVariableFeatureFlags(), AdaptiveSourceRunner.CLOUD_MODE));
return MssqlSource.sshWrappedSource(source);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.io.IOException;
import java.io.UncheckedIOException;
import java.sql.SQLException;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -384,7 +385,7 @@ public MsSQLConfigBuilder withCdcReplication() {
return with("is_test", true)
.with("replication_method", Map.of(
"method", "CDC",
"initial_waiting_seconds", DEFAULT_CDC_REPLICATION_INITIAL_WAIT.getSeconds(),
"initial_waiting_seconds", Duration.ofSeconds(20).getSeconds(),
INVALID_CDC_CURSOR_POSITION_PROPERTY, RESYNC_DATA_OPTION));
}

Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/mssql.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configura
<summary>Expand to review</summary>

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :---------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- |
|:--------|:-----------| :---------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------|
| 4.1.19 | 2025-01-16 | [51596](https://github.com/airbytehq/airbyte/pull/51596) | Bump driver versions to latest (jdbc, debezium, cdk) |
| 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. |
| 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 |
| 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. |
Expand Down

0 comments on commit a610ad8

Please sign in to comment.