Skip to content

Commit

Permalink
derp
Browse files Browse the repository at this point in the history
  • Loading branch information
edgao committed Sep 4, 2024
1 parent 75ce250 commit 8d9871f
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 66 deletions.
6 changes: 0 additions & 6 deletions airbyte-cdk/bulk/core/load/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ dependencies {
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1")
implementation "org.jetbrains.kotlin:kotlin-reflect:2.0.0"
}

java {
compileJava {
options.compilerArgs.remove("-Werror")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package io.airbyte.cdk.test.util

import io.micronaut.context.annotation.Property
import io.micronaut.context.annotation.Requires
import io.micronaut.test.extensions.junit5.annotation.MicronautTest
import javax.inject.Inject
import javax.inject.Singleton
import org.junit.jupiter.api.Test

@MicronautTest
class IntegrationTestTest() {
@Inject
@Test
@Property(name = "testtest", value = "string")
fun foo(thingDoer: ThingDoer) {
println(thingDoer.conf)
}
}

interface Conf

@Singleton
@Requires(property = "testtest", value = "string")
class StringConf(): Conf

@Singleton
@Requires(property = "testtest", value = "int")
class IntConf(): Conf

@Singleton
class ThingDoer(val conf: Conf)
Original file line number Diff line number Diff line change
Expand Up @@ -19,54 +19,54 @@ interface DestinationProcess {
fun waitUntilDone()
}

//class NonDockerizedDestination(
// command: String,
// config: JsonNode,
// catalog: ConfiguredAirbyteCatalog,
// // some other param to get whatever code we're actually running,
// // i.e. equivalent to io.airbyte.integrations.base.destination.Destination
// operation: Operation,
//): DestinationProcess {
// init {
// // invoke whatever CDK stuff exists to run a destination connector
// // but use some reasonable interface instead of stdin/stdout
// }
//
// override fun sendMessage(message: AirbyteMessage) {
// TODO("Not yet implemented")
// }
//
// override fun readMessages(): List<AirbyteMessage> {
// TODO("Not yet implemented")
// }
//
// override fun waitUntilDone() {
// // send a "stdin closed" signal
// TODO("Not yet implemented")
// }
//}
//
//class DockerizedDestination(
// command: String,
// config: JsonNode,
// catalog: ConfiguredAirbyteCatalog,
//): DestinationProcess {
// init {
// // launch a docker container...
// }
//
// override fun sendMessage(message: AirbyteMessage) {
// // push a message to the docker process' stdin
// TODO("Not yet implemented")
// }
//
// override fun readMessages(): List<AirbyteMessage> {
// // read everything from the process' stdout
// TODO("Not yet implemented")
// }
//
// override fun waitUntilDone() {
// // close stdin, wait until process exits
// TODO("Not yet implemented")
// }
//}
class NonDockerizedDestination(
command: String,
config: JsonNode,
catalog: ConfiguredAirbyteCatalog,
// some other param to get whatever code we're actually running,
// i.e. equivalent to io.airbyte.integrations.base.destination.Destination
operation: Operation,
): DestinationProcess {
init {
// invoke whatever CDK stuff exists to run a destination connector
// but use some reasonable interface instead of stdin/stdout
}

override fun sendMessage(message: AirbyteMessage) {
TODO("Not yet implemented")
}

override fun readMessages(): List<AirbyteMessage> {
TODO("Not yet implemented")
}

override fun waitUntilDone() {
// send a "stdin closed" signal
TODO("Not yet implemented")
}
}

class DockerizedDestination(
command: String,
config: JsonNode,
catalog: ConfiguredAirbyteCatalog,
): DestinationProcess {
init {
// launch a docker container...
}

override fun sendMessage(message: AirbyteMessage) {
// push a message to the docker process' stdin
TODO("Not yet implemented")
}

override fun readMessages(): List<AirbyteMessage> {
// read everything from the process' stdout
TODO("Not yet implemented")
}

override fun waitUntilDone() {
// close stdin, wait until process exits
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import io.micronaut.test.extensions.junit5.annotation.MicronautTest
import org.junit.jupiter.api.Test

@MicronautTest
class IntegrationTest {
@Test
@Property(name = Operation.PROPERTY, value = "write")
fun foo(op: Operation) {
println(op)
}
abstract class IntegrationTest {

}
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ allprojects {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
languageVersion = KotlinVersion.KOTLIN_1_9
allWarningsAsErrors = true
allWarningsAsErrors = false
freeCompilerArgs = ["-Xjvm-default=all"]
}
dependsOn {
Expand All @@ -87,7 +87,7 @@ allprojects {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
languageVersion = KotlinVersion.KOTLIN_1_9
allWarningsAsErrors = true
allWarningsAsErrors = false
freeCompilerArgs = ["-Xjvm-default=all"]
}
dependsOn {
Expand All @@ -98,7 +98,7 @@ allprojects {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
languageVersion = KotlinVersion.KOTLIN_1_9
allWarningsAsErrors = true
allWarningsAsErrors = false
freeCompilerArgs = ["-Xjvm-default=all"]
}
dependsOn {
Expand Down Expand Up @@ -235,4 +235,8 @@ allprojects {
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.suppressWarnings = true
}
}

0 comments on commit 8d9871f

Please sign in to comment.