remove all dependencies to lombok (#37627)
We only use lombok for super trivial stuff and it tends to not play well with Micronauts. Lets' get rid of it!
This commit is contained in:
@@ -11,7 +11,6 @@ import io.airbyte.commons.json.Jsons
|
||||
import io.airbyte.protocol.models.v0.AirbyteMessage
|
||||
import io.airbyte.protocol.models.v0.ConfiguredAirbyteCatalog
|
||||
import java.util.function.Consumer
|
||||
import lombok.extern.slf4j.Slf4j
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
@@ -64,7 +63,6 @@ interface Destination : Integration {
|
||||
* Backwards-compatibility wrapper for an AirbyteMessageConsumer. Strips the sizeInBytes
|
||||
* argument away from the .accept call.
|
||||
*/
|
||||
@Slf4j
|
||||
class ShimToSerializedAirbyteMessageConsumer(private val consumer: AirbyteMessageConsumer?) :
|
||||
SerializedAirbyteMessageConsumer {
|
||||
@Throws(Exception::class)
|
||||
|
||||
@@ -10,7 +10,6 @@ import io.airbyte.protocol.models.AirbyteTraceMessage
|
||||
import java.io.*
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.*
|
||||
import lombok.SneakyThrows
|
||||
import org.junit.jupiter.api.AfterEach
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
@@ -202,7 +201,6 @@ class AirbyteExceptionHandlerTest {
|
||||
// because junit catches any exceptions in main thread, i.e. they're not 'uncaught'
|
||||
val thread: Thread =
|
||||
object : Thread() {
|
||||
@SneakyThrows
|
||||
override fun run() {
|
||||
val runner = Mockito.mock(IntegrationRunner::class.java)
|
||||
Mockito.doThrow(throwable).`when`(runner).run(arrayOf("write"))
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.HashMap
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import java.util.concurrent.CompletionStage
|
||||
import java.util.function.Predicate
|
||||
import lombok.extern.slf4j.Slf4j
|
||||
import org.jooq.Condition
|
||||
import org.jooq.DSLContext
|
||||
import org.jooq.SQLDialect
|
||||
@@ -39,7 +38,6 @@ import org.jooq.impl.SQLDataType
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
@Slf4j
|
||||
abstract class JdbcDestinationHandler<DestinationState>(
|
||||
protected val databaseName: String,
|
||||
protected val jdbcDatabase: JdbcDatabase,
|
||||
|
||||
@@ -13,7 +13,6 @@ import io.airbyte.integrations.base.destination.typing_deduping.StreamConfig
|
||||
import java.sql.DatabaseMetaData
|
||||
import java.sql.SQLException
|
||||
import java.util.*
|
||||
import lombok.SneakyThrows
|
||||
|
||||
/**
|
||||
* Largely based on
|
||||
@@ -24,7 +23,6 @@ class JdbcV1V2Migrator(
|
||||
private val database: JdbcDatabase,
|
||||
private val databaseName: String
|
||||
) : BaseDestinationV1V2Migrator<TableDefinition>() {
|
||||
@SneakyThrows
|
||||
override fun doesAirbyteInternalNamespaceExist(streamConfig: StreamConfig?): Boolean {
|
||||
val retrievedSchema =
|
||||
database.executeMetadataQuery<String> { dbMetadata: DatabaseMetaData? ->
|
||||
@@ -54,7 +52,6 @@ class JdbcV1V2Migrator(
|
||||
return existingTable.columns.keys.containsAll(columns)
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Throws(Exception::class)
|
||||
override fun getTableIfExists(
|
||||
namespace: String?,
|
||||
|
||||
@@ -12,9 +12,8 @@ import io.airbyte.cdk.integrations.destination.s3.util.CompressionTypeHelper
|
||||
import io.airbyte.cdk.integrations.destination.s3.util.Flattening
|
||||
import io.airbyte.cdk.integrations.destination.s3.util.Flattening.Companion.fromValue
|
||||
import java.util.*
|
||||
import lombok.ToString
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder
|
||||
|
||||
@ToString
|
||||
class UploadJsonlFormatConfig(
|
||||
val flatteningType: Flattening,
|
||||
val compressionType: CompressionType
|
||||
@@ -51,6 +50,10 @@ class UploadJsonlFormatConfig(
|
||||
return Objects.hash(flatteningType, compressionType)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return ToStringBuilder.reflectionToString(this)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val JSONL_SUFFIX: String = ".jsonl"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import kotlin.collections.List
|
||||
import kotlin.collections.MutableMap
|
||||
import kotlin.collections.emptyList
|
||||
import kotlin.collections.set
|
||||
import lombok.SneakyThrows
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -59,7 +58,6 @@ class DefaultTyperDeduperTest {
|
||||
|
||||
private val MIGRATION_REQUIRING_SOFT_RESET: Migration<MockState> =
|
||||
object : Migration<MockState> {
|
||||
@SneakyThrows
|
||||
override fun migrateIfNecessary(
|
||||
destinationHandler: DestinationHandler<MockState>,
|
||||
stream: StreamConfig,
|
||||
|
||||
@@ -7,7 +7,6 @@ import io.airbyte.cdk.integrations.base.JavaBaseConstants
|
||||
import io.airbyte.protocol.models.v0.DestinationSyncMode
|
||||
import java.util.*
|
||||
import java.util.stream.Stream
|
||||
import lombok.SneakyThrows
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.extension.ExtensionContext
|
||||
@@ -99,7 +98,6 @@ class DestinationV1V2MigratorTest {
|
||||
)
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testMigrate() {
|
||||
|
||||
@@ -22,12 +22,13 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class Main {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Main.class);
|
||||
private static final String CREDENTIALS_PATH = "secrets/%s_%s_credentials.json";
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
@@ -50,7 +50,8 @@ import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.regex.Pattern;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This is a crude copy of {@link io.airbyte.workers.general.DefaultReplicationWorker} where if that
|
||||
@@ -58,9 +59,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* of the platform from the perspectives of the platform communicating with the destination by
|
||||
* sending AirbyteRecordMessages the same way platform pipes data into the destination
|
||||
*/
|
||||
@Slf4j
|
||||
public class PerformanceHarness {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PerformanceHarness.class);
|
||||
public static final int PORT1 = 9877;
|
||||
public static final int PORT2 = 9878;
|
||||
public static final int PORT3 = 9879;
|
||||
|
||||
@@ -13,12 +13,13 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class Main {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Main.class);
|
||||
private static final String CREDENTIALS_PATH = "secrets/%s_%s_credentials.json";
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
@@ -40,11 +40,12 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
public class PerformanceTest {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PerformanceTest.class);
|
||||
public static final int PORT1 = 9877;
|
||||
public static final int PORT2 = 9878;
|
||||
public static final int PORT3 = 9879;
|
||||
|
||||
@@ -188,15 +188,6 @@ allprojects {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Lombok dependencies.
|
||||
def lombok = "org.projectlombok:lombok:1.18.30"
|
||||
compileOnly lombok
|
||||
annotationProcessor lombok
|
||||
testCompileOnly lombok
|
||||
testAnnotationProcessor lombok
|
||||
testFixturesCompileOnly lombok
|
||||
testFixturesAnnotationProcessor lombok
|
||||
|
||||
// JUnit dependencies.
|
||||
def vAssertJ = "3.25.3"
|
||||
def vJUnit = "5.10.2"
|
||||
|
||||
Reference in New Issue
Block a user