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

destination-mysql: convert prod code to kotlin #40553

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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: ca81ee7c-3163-4246-af40-094cc31e5e42
dockerImageTag: 1.0.1
dockerImageTag: 1.0.2
dockerRepository: airbyte/destination-mysql-strict-encrypt
githubIssueLabel: destination-mysql
icon: mysql.svg
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2023 Airbyte, Inc., all rights reserved.
*/
package io.airbyte.integrations.destination.mysql

import com.fasterxml.jackson.databind.node.ObjectNode
import io.airbyte.cdk.db.jdbc.JdbcUtils
import io.airbyte.cdk.integrations.base.Destination
import io.airbyte.cdk.integrations.base.IntegrationRunner
import io.airbyte.cdk.integrations.base.spec_modification.SpecModifyingDestination
import io.airbyte.commons.json.Jsons
import io.airbyte.protocol.models.v0.ConnectorSpecification
import org.slf4j.Logger
import org.slf4j.LoggerFactory

class MySQLDestinationStrictEncrypt :
SpecModifyingDestination(MySQLDestination.sshWrappedDestination()), Destination {
override fun modifySpec(originalSpec: ConnectorSpecification): ConnectorSpecification {
val spec: ConnectorSpecification = Jsons.clone(originalSpec)
(spec.connectionSpecification["properties"] as ObjectNode).remove(JdbcUtils.SSL_KEY)
return spec
}

companion object {
private val LOGGER: Logger =
LoggerFactory.getLogger(MySQLDestinationStrictEncrypt::class.java)

@Throws(Exception::class)
@JvmStatic
fun main(args: Array<String>) {
val destination: Destination = MySQLDestinationStrictEncrypt()
LOGGER.info("starting destination: {}", MySQLDestinationStrictEncrypt::class.java)
try {
IntegrationRunner(destination).run(args)
} catch (e: Exception) {
MySQLDestination.handleException(e)
}
LOGGER.info("completed destination: {}", MySQLDestinationStrictEncrypt::class.java)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ java {
}
}

compileKotlin.compilerOptions.allWarningsAsErrors = false

airbyteJavaConnector.addCdkDependencies()

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: ca81ee7c-3163-4246-af40-094cc31e5e42
dockerImageTag: 1.0.1
dockerImageTag: 1.0.2
dockerRepository: airbyte/destination-mysql
githubIssueLabel: destination-mysql
icon: mysql.svg
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading