From 052e8a5799430338f61e28cac538f468c8a6e643 Mon Sep 17 00:00:00 2001 From: Derek Smart Date: Wed, 16 Oct 2019 09:52:00 -0400 Subject: [PATCH] Release 0.3.3 (#72) --- config/jni-config.json | 18 +- config/reflect-config.json | 201 ++++++++++-------- config/resource-config.json | 2 + pom.xml | 17 +- src/main/kotlin/io/titandata/titan/Cli.kt | 2 + .../io/titandata/titan/providers/Local.kt | 2 +- .../io/titandata/titan/providers/local/Run.kt | 2 +- src/main/resources/log4j.properties | 5 + 8 files changed, 145 insertions(+), 104 deletions(-) create mode 100644 src/main/resources/log4j.properties diff --git a/config/jni-config.json b/config/jni-config.json index c0b782e5..c0641b79 100644 --- a/config/jni-config.json +++ b/config/jni-config.json @@ -1,11 +1,11 @@ [ - { - "name":"java.net.SocketTimeoutException", - "allDeclaredFields":true, - "allPublicMethods":true, - "allDeclaredConstructors":true, - "allPublicConstructors":true, - "allDeclaredClasses":true, - "allPublicClasses":true - } +{ + "name":"java.net.SocketTimeoutException", + "allDeclaredFields":true, + "allPublicMethods":true, + "allDeclaredConstructors":true, + "allPublicConstructors":true, + "allDeclaredClasses":true, + "allPublicClasses":true +} ] diff --git a/config/reflect-config.json b/config/reflect-config.json index 096b7279..af08f46a 100644 --- a/config/reflect-config.json +++ b/config/reflect-config.json @@ -18,7 +18,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.engine.EngineParameters", + "name":"io.titandata.models.Error", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -27,7 +27,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.engine.EngineParameters[]", + "name":"io.titandata.models.Error[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -36,7 +36,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.engine.EngineRemote", + "name":"io.titandata.models.Operation", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -45,7 +45,23 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.engine.EngineRemote[]", + "name":"io.titandata.models.Operation$State", + "fields":[ + {"name":"ABORTED"}, + {"name":"COMPLETE"}, + {"name":"FAILED"}, + {"name":"RUNNING"} + ] +}, +{ + "name":"io.titandata.models.Operation$Type", + "fields":[ + {"name":"PULL"}, + {"name":"PUSH"} + ] +}, +{ + "name":"io.titandata.models.Operation[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -54,7 +70,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Error", + "name":"io.titandata.models.PluginDescription", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -63,7 +79,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Error[]", + "name":"io.titandata.models.PluginDescription[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -72,7 +88,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.nop.NopParameters", + "name":"io.titandata.models.ProgressEntry", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -81,7 +97,20 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.nop.NopParameters[]", + "name":"io.titandata.models.ProgressEntry$Type", + "fields":[ + {"name":"ABORT"}, + {"name":"COMPLETE"}, + {"name":"END"}, + {"name":"ERROR"}, + {"name":"FAILED"}, + {"name":"MESSAGE"}, + {"name":"PROGRESS"}, + {"name":"START"} + ] +}, +{ + "name":"io.titandata.models.ProgressEntry[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -90,7 +119,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.nop.NopRemote", + "name":"io.titandata.models.Remote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -99,7 +128,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.nop.NopRemote[]", + "name":"io.titandata.models.RemoteParameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -108,7 +137,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Operation", + "name":"io.titandata.models.RemoteParameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -117,23 +146,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Operation$State", - "fields":[ - {"name":"ABORTED"}, - {"name":"COMPLETE"}, - {"name":"FAILED"}, - {"name":"RUNNING"} - ] -}, -{ - "name":"io.titandata.models.Operation$Type", - "fields":[ - {"name":"PULL"}, - {"name":"PUSH"} - ] -}, -{ - "name":"io.titandata.models.Operation[]", + "name":"io.titandata.models.Remote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -142,7 +155,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.PluginDescription", + "name":"io.titandata.models.Repository", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -151,7 +164,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.PluginDescription[]", + "name":"io.titandata.models.Repository[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -160,7 +173,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.ProgressEntry", + "name":"io.titandata.models.Volume", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -169,20 +182,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.ProgressEntry$Type", - "fields":[ - {"name":"ABORT"}, - {"name":"COMPLETE"}, - {"name":"END"}, - {"name":"ERROR"}, - {"name":"FAILED"}, - {"name":"MESSAGE"}, - {"name":"PROGRESS"}, - {"name":"START"} - ] -}, -{ - "name":"io.titandata.models.ProgressEntry[]", + "name":"io.titandata.models.VolumeCapabilities", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -191,7 +191,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Remote", + "name":"io.titandata.models.VolumeCapabilitiesResponse", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -200,7 +200,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.RemoteParameters", + "name":"io.titandata.models.VolumeCapabilitiesResponse[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -209,7 +209,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.RemoteParameters[]", + "name":"io.titandata.models.VolumeCapabilities[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -218,7 +218,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Remote[]", + "name":"io.titandata.models.VolumeCreateRequest", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -227,7 +227,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Repository", + "name":"io.titandata.models.VolumeCreateRequest[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -236,7 +236,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Repository[]", + "name":"io.titandata.models.VolumeGetResponse", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -245,7 +245,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3.S3Parameters", + "name":"io.titandata.models.VolumeGetResponse[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -254,7 +254,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3.S3Parameters[]", + "name":"io.titandata.models.VolumeListResponse", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -263,7 +263,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3.S3Remote", + "name":"io.titandata.models.VolumeListResponse[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -272,7 +272,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3.S3Remote[]", + "name":"io.titandata.models.VolumeMountRequest", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -281,7 +281,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3web.S3WebParameters", + "name":"io.titandata.models.VolumeMountRequest[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -290,7 +290,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3web.S3WebParameters[]", + "name":"io.titandata.models.VolumePathResponse", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -299,7 +299,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3web.S3WebRemote", + "name":"io.titandata.models.VolumePathResponse[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -308,7 +308,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.s3web.S3WebRemote[]", + "name":"io.titandata.models.VolumeRequest", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -317,7 +317,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.ssh.SshParameters", + "name":"io.titandata.models.VolumeRequest[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -326,7 +326,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.ssh.SshParameters[]", + "name":"io.titandata.models.VolumeResponse", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -335,7 +335,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.ssh.SshRemote", + "name":"io.titandata.models.VolumeResponse[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -344,7 +344,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.remote.ssh.SshRemote[]", + "name":"io.titandata.models.Volume[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -353,7 +353,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Volume", + "name":"io.titandata.remote.engine.EngineParameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -362,7 +362,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCapabilities", + "name":"io.titandata.remote.engine.EngineParameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -371,7 +371,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCapabilitiesResponse", + "name":"io.titandata.remote.engine.EngineRemote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -380,7 +380,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCapabilitiesResponse[]", + "name":"io.titandata.remote.engine.EngineRemote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -389,7 +389,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCapabilities[]", + "name":"io.titandata.remote.nop.NopParameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -398,7 +398,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCreateRequest", + "name":"io.titandata.remote.nop.NopParameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -407,7 +407,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeCreateRequest[]", + "name":"io.titandata.remote.nop.NopRemote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -416,7 +416,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeGetResponse", + "name":"io.titandata.remote.nop.NopRemote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -425,7 +425,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeGetResponse[]", + "name":"io.titandata.remote.s3.S3Parameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -434,7 +434,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeListResponse", + "name":"io.titandata.remote.s3.S3Parameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -443,7 +443,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeListResponse[]", + "name":"io.titandata.remote.s3.S3Remote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -452,7 +452,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeMountRequest", + "name":"io.titandata.remote.s3.S3Remote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -461,7 +461,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeMountRequest[]", + "name":"io.titandata.remote.s3web.S3WebParameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -470,7 +470,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumePathResponse", + "name":"io.titandata.remote.s3web.S3WebParameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -479,7 +479,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumePathResponse[]", + "name":"io.titandata.remote.s3web.S3WebRemote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -488,7 +488,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeRequest", + "name":"io.titandata.remote.s3web.S3WebRemote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -497,7 +497,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeRequest[]", + "name":"io.titandata.remote.ssh.SshParameters", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -506,7 +506,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeResponse", + "name":"io.titandata.remote.ssh.SshParameters[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -515,7 +515,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.VolumeResponse[]", + "name":"io.titandata.remote.ssh.SshRemote", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -524,7 +524,7 @@ "allPublicClasses":true }, { - "name":"io.titandata.models.Volume[]", + "name":"io.titandata.remote.ssh.SshRemote[]", "allDeclaredFields":true, "allPublicMethods":true, "allDeclaredConstructors":true, @@ -532,6 +532,13 @@ "allDeclaredClasses":true, "allPublicClasses":true }, +{ + "name":"java.lang.String" +}, +{ + "name":"java.lang.Thread", + "methods":[{"name":"getContextClassLoader","parameterTypes":[] }] +}, { "name":"java.lang.Throwable", "methods":[{"name":"addSuppressed","parameterTypes":["java.lang.Throwable"] }] @@ -551,7 +558,33 @@ "name":"kotlin.jvm.internal.DefaultConstructorMarker" }, { - "name":"org.slf4j.impl.NOPLoggerFactory" + "name":"org.apache.log4j.Appender" +}, +{ + "name":"org.apache.log4j.Category" +}, +{ + "name":"org.apache.log4j.CategoryKey" +}, +{ + "name":"org.apache.log4j.ConsoleAppender", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.apache.log4j.Layout" +}, +{ + "name":"org.apache.log4j.Logger" +}, +{ + "name":"org.apache.log4j.PatternLayout", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.apache.log4j.helpers.Loader" +}, +{ + "name":"org.apache.log4j.spi.OptionHandler" }, { "name":"sun.misc.Unsafe", diff --git a/config/resource-config.json b/config/resource-config.json index e705415f..295f022f 100644 --- a/config/resource-config.json +++ b/config/resource-config.json @@ -1,6 +1,8 @@ { "resources":[ {"pattern":"VERSION"}, + {"pattern":"log4j.properties"}, + {"pattern":"org/slf4j/impl/StaticLoggerBinder.class"}, {"pattern":"sun/net/idn/uidna.spp"}, {"pattern":"sun/text/resources/unorm.icu"} ] diff --git a/pom.xml b/pom.xml index 2bc91398..30310a09 100644 --- a/pom.xml +++ b/pom.xml @@ -94,12 +94,6 @@ wordnet-random-name 1.3 - - org.codehaus.mojo - versions-maven-plugin - 2.7 - maven-plugin - org.apache.commons commons-lang3 @@ -117,13 +111,13 @@ org.slf4j - slf4j-nop - 1.5.3 + slf4j-log4j12 + 1.7.28 io.titandata titan-client - 0.4.5 + 0.4.6 @@ -154,6 +148,11 @@ + + org.codehaus.mojo + versions-maven-plugin + 2.7 + kotlin-maven-plugin org.jetbrains.kotlin diff --git a/src/main/kotlin/io/titandata/titan/Cli.kt b/src/main/kotlin/io/titandata/titan/Cli.kt index fc758a62..7db38b76 100644 --- a/src/main/kotlin/io/titandata/titan/Cli.kt +++ b/src/main/kotlin/io/titandata/titan/Cli.kt @@ -10,6 +10,7 @@ import com.github.ajalt.clikt.core.CliktCommand import com.github.ajalt.clikt.core.subcommands import com.github.ajalt.clikt.parameters.options.versionOption import io.titandata.titan.exceptions.CommandException +import org.apache.log4j.BasicConfigurator import org.kodein.di.Kodein import org.kodein.di.generic.bind import org.kodein.di.generic.instance @@ -31,6 +32,7 @@ object Cli { @JvmStatic fun main(args: Array) { + BasicConfigurator.configure(); val version = Cli::class.java.getResource("/VERSION").readText() val kodein = Kodein { bind() from setBinding() diff --git a/src/main/kotlin/io/titandata/titan/providers/Local.kt b/src/main/kotlin/io/titandata/titan/providers/Local.kt index b98403d8..6353f2af 100644 --- a/src/main/kotlin/io/titandata/titan/providers/Local.kt +++ b/src/main/kotlin/io/titandata/titan/providers/Local.kt @@ -18,7 +18,7 @@ data class Container ( ) class Local: Provider { - private val titanServerVersion = "0.4.5" + private val titanServerVersion = "0.4.6" private val dockerRegistryUrl = "titandata" private val httpHandler = HttpHandler() diff --git a/src/main/kotlin/io/titandata/titan/providers/local/Run.kt b/src/main/kotlin/io/titandata/titan/providers/local/Run.kt index 0535cca2..87f40809 100644 --- a/src/main/kotlin/io/titandata/titan/providers/local/Run.kt +++ b/src/main/kotlin/io/titandata/titan/providers/local/Run.kt @@ -76,7 +76,7 @@ class Run ( argList.add("--name") argList.add(containerName) argList.addAll(argumentEdit) - val repoDigest = imageInfo.optJSONArray("RepoDigests")[0] as String + val repoDigest = imageInfo.optJSONArray("RepoDigests").optString(0) val dockerRunCommand = if(repoDigest.isNullOrEmpty()) { "$image:$tag" } else { diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 00000000..746ac9e1 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,5 @@ +log4j.rootLogger=ERROR, stdout + +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout \ No newline at end of file