Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep for Java 19 Upgrade #20911

Merged
merged 5 commits into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airbyte-bootloader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {
implementation libs.flyway.core

testImplementation libs.platform.testcontainers.postgresql
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void init() {
@Test
@DisplayName("The MDC context is properly overrided")
void testMDCModified() {
try (final MdcScope mdcScope = new MdcScope(modificationInMDC)) {
try (final MdcScope ignored = new MdcScope(modificationInMDC)) {
final Map<String, String> mdcState = MDC.getCopyOfContextMap();

Assertions.assertThat(mdcState).containsExactlyInAnyOrderEntriesOf(
Expand All @@ -36,7 +36,7 @@ void testMDCModified() {
@Test
@DisplayName("The MDC context is properly restored")
void testMDCRestore() {
try (final MdcScope mdcScope = new MdcScope(modificationInMDC)) {}
try (final MdcScope ignored = new MdcScope(modificationInMDC)) {}

final Map<String, String> mdcState = MDC.getCopyOfContextMap();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ private static Stream<Arguments> provideTestCases() {

@ParameterizedTest
@MethodSource(PROVIDE_TEST_CASES)
@SuppressWarnings({"PMD.JUnitTestsShouldIncludeAssert"})
public void validateTestCases(final SecretsTestCase testCase) throws JsonValidationException {
final var validator = new JsonSchemaValidator();
final var spec = testCase.getSpec().getConnectionSpecification();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.airbyte.integrations.destination.mysql;

import com.fasterxml.jackson.databind.JsonNode;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.airbyte.db.jdbc.JdbcDatabase;
import io.airbyte.integrations.base.JavaBaseConstants;
import io.airbyte.integrations.destination.StandardNameTransformer;
Expand All @@ -13,10 +14,14 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

@SuppressFBWarnings(
value = {"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE"},
justification = "There is little chance of SQL injection. There is also little need for statement reuse. The basic statement is more readable than the prepared statement.")
public class MySQLSqlOperations extends JdbcSqlOperations {

private boolean isLocalFileEnabled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.airbyte.integrations.destination.tidb;

import com.fasterxml.jackson.databind.JsonNode;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.airbyte.db.jdbc.JdbcDatabase;
import io.airbyte.integrations.base.JavaBaseConstants;
import io.airbyte.integrations.destination.StandardNameTransformer;
Expand All @@ -17,6 +18,9 @@
import java.sql.Statement;
import java.util.List;

@SuppressFBWarnings(
value = {"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE"},
justification = "There is little chance of SQL injection. There is also little need for statement reuse. The basic statement is more readable than the prepared statement.")
public class TiDBSqlOperations extends JdbcSqlOperations {

@Override
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
testImplementation libs.postgresql
testImplementation libs.connectors.testcontainers.postgresql

testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs

integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test')
integrationTestJavaImplementation libs.connectors.testcontainers.postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {

testImplementation testFixtures(project(':airbyte-integrations:connectors:source-jdbc'))
testImplementation project(':airbyte-test-utils')
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs

testImplementation libs.connectors.testcontainers.mysql

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
testImplementation testFixtures(project(':airbyte-integrations:connectors:source-jdbc'))
testImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs
testImplementation libs.connectors.testcontainers.mysql

integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
testImplementation project(':airbyte-test-utils')
testImplementation libs.connectors.testcontainers.jdbc
testImplementation libs.connectors.testcontainers.postgresql
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs

integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test')
performanceTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
testImplementation libs.postgresql
testImplementation libs.connectors.testcontainers.postgresql

testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.1'
testImplementation libs.junit.jupiter.system.stubs

implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public AttemptHandler(JobPersistence jobPersistence) {
public InternalOperationResult setWorkflowInAttempt(SetWorkflowInAttemptRequestBody requestBody) {
try {
jobPersistence.setAttemptTemporalWorkflowInfo(requestBody.getJobId(),
requestBody.getAttemptNumber(), requestBody.getWorkflowId().toString(), requestBody.getProcessingTaskQueue());
requestBody.getAttemptNumber(), requestBody.getWorkflowId(), requestBody.getProcessingTaskQueue());
} catch (IOException ioe) {
LOGGER.error("IOException when setting temporal workflow in attempt;", ioe);
return new InternalOperationResult().succeeded(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public class AirbyteAcceptanceTestHarness {
private final UUID defaultWorkspaceId;
private final String postgresSqlInitFile;

private KubernetesClient kubernetesClient = null;
private KubernetesClient kubernetesClient;

private List<UUID> sourceIds;
private List<UUID> connectionIds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public WorkspaceHelper workspaceHelper(
@Singleton
public AirbyteConfigValidator airbyteConfigValidator() {
return new AirbyteConfigValidator();
};
}

@Singleton
public MetricClient metricClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class DiscoverCatalogActivityImpl implements DiscoverCatalogActivity {
private final Path workspaceRoot;
private final WorkerEnvironment workerEnvironment;
private final LogConfigs logConfigs;
private final AirbyteApiClient airbyteApiClient;;
private final AirbyteApiClient airbyteApiClient;
private final String airbyteVersion;

private final ConfigRepository configRepository;
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
plugins {
id 'base'
id 'pmd'
id 'com.diffplug.spotless' version '6.7.1'
id 'com.diffplug.spotless' version '6.12.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'com.github.spotbugs' version '5.0.13'
// The distribution plugin has been added to address the an issue with the copyGeneratedTar
Expand Down Expand Up @@ -302,11 +302,11 @@ subprojects { subproj ->
rulesMinimumPriority = 5
ruleSets = []
ruleSetFiles = files(rootProject.file('tools/gradle/pmd/rules.xml'))
toolVersion = '6.43.0'
toolVersion = '6.51.0'
}

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.8"
}

jacocoTestReport {
Expand Down Expand Up @@ -349,7 +349,7 @@ subprojects { subproj ->
excludeFilter = rootProject.file('spotbugs-exclude-filter-file.xml')
reportLevel = 'high'
showProgress = false
toolVersion = '4.6.0'
toolVersion = '4.7.3'
}

test {
Expand Down
Loading