diff --git a/.addlicense.yml b/.addlicense.yml index 9f20b798e..4cfe46249 100644 --- a/.addlicense.yml +++ b/.addlicense.yml @@ -10,66 +10,66 @@ hasLicensePatterns: # File extension commenting format configuration fileExtensions: - - extensions: [".c", ".h"] + - extensions: [ ".c", ".h" ] top: "/*" mid: " * " bot: "*/" - - extensions: [".js", ".mjs", ".cjs", ".jsx", ".tsx", ".css", ".tf", ".ts", ".java", ".kt", ".kts"] + - extensions: [ ".js", ".mjs", ".cjs", ".jsx", ".tsx", ".css", ".tf", ".ts", ".java", ".kt", ".kts" ] top: "/**" mid: " * " bot: " */" - extensions: [ - ".cc", - ".cpp", - ".cs", - ".go", - ".hh", - ".hpp", - ".m", - ".mm", - ".proto", - ".rs", - ".scala", - ".swift", - ".dart", - ".groovy", - ".php", + ".cc", + ".cpp", + ".cs", + ".go", + ".hh", + ".hpp", + ".m", + ".mm", + ".proto", + ".rs", + ".scala", + ".swift", + ".dart", + ".groovy", + ".php", ] top: "" mid: "// " bot: "" - extensions: [ - ".py", - ".sh", - ".yaml", - ".yml", - ".dockerfile", - "dockerfile", - ".rb", - "gemfile", + ".py", + ".sh", + ".yaml", + ".yml", + ".dockerfile", + "dockerfile", + ".rb", + "gemfile", ] top: "" mid: "# " bot: "" - - extensions: [".el", ".lisp"] + - extensions: [ ".el", ".lisp" ] top: "" mid: ";; " bot: "" - - extensions: [".erl"] + - extensions: [ ".erl" ] top: "" mid: "% " bot: "" - - extensions: [".hs", ".sql"] + - extensions: [ ".hs", ".sql" ] top: "" mid: "-- " bot: "" - - extensions: [".html", ".xml", ".vue"] + - extensions: [ ".html", ".xml", ".vue" ] top: "" - - extensions: [".ml", ".mli", ".mll", ".mly"] + - extensions: [ ".ml", ".mli", ".mll", ".mly" ] top: "(**" mid: " " bot: "*)" diff --git a/.github/stale.yml b/.github/stale.yml index 80c6ce7ee..d434e0d6e 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -31,7 +31,7 @@ daysUntilStale: 60 daysUntilClose: 7 # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] +onlyLabels: [ ] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: diff --git a/.github/workflows/engine-ci.yml b/.github/workflows/engine-ci.yml index 420ec7e69..daa4d8a3a 100644 --- a/.github/workflows/engine-ci.yml +++ b/.github/workflows/engine-ci.yml @@ -38,11 +38,27 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 - - name: Setup Java 11 + - name: Setup Java 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Build with Gradle - run: ./gradlew build # <= -d used to debug if needed - timeout-minutes: 15 # max time allocated (useful if some tests hang) + run: ./gradlew build --no-daemon -x test -x spotlessCheck --parallel --max-workers=8 # <= -d used to debug if needed + timeout-minutes: 5 # max time allocated (useful if some tests hang) + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup Java 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Test with Gradle + run: ./gradlew test --no-daemon --parallel --max-workers=8 # <= -d used to debug if needed + timeout-minutes: 20 # max time allocated (useful if some tests hang) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd7e72f60..8457ec68d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,10 +35,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 - - name: Setup Java 11 + - name: Setup Java 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 # - name: Run gradle build # uses: eskatos/gradle-command-action@v1 diff --git a/.github/workflows/repository.yml b/.github/workflows/repository.yml index 902e8a9ba..d6261c0e5 100644 --- a/.github/workflows/repository.yml +++ b/.github/workflows/repository.yml @@ -28,7 +28,7 @@ on: - main jobs: - lint: + license: runs-on: ubuntu-latest steps: @@ -39,3 +39,19 @@ jobs: uses: ./.github/actions/addlicense-action env: OPTIONS: "-s -c infinitic.io -f .license-header -config .addlicense.yml -check" + + linter: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup Java 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Check lint with Gradle Spotless + run: ./gradlew spotlessCheck --no-daemon --parallel --max-workers=8 # <= -d used to debug if needed + timeout-minutes: 5 # max time allocated (useful if some tests hang) diff --git a/README.md b/README.md index a3458e81c..9507ac746 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,15 @@ Infinitic is still in active development. Subscribe [here](https://infinitic.sub ## What is it? -Infinitic is a framework based on [Apache Pulsar](https://pulsar.apache.org/) that considerably eases building asynchronous distributed apps. +Infinitic is a framework based on [Apache Pulsar](https://pulsar.apache.org/) that considerably eases building +asynchronous distributed apps. -Many issues arise when we build and scale a distributed system - issues we don’t have in a single-process one. Infinitic provides simple but powerful libraries that let developers build distributed applications as if they were run on an infallible single-process system. It does this on top of Pulsar to benefit from its scalability and reliability. +Many issues arise when we build and scale a distributed system - issues we don’t have in a single-process one. Infinitic +provides simple but powerful libraries that let developers build distributed applications as if they were run on an +infallible single-process system. It does this on top of Pulsar to benefit from its scalability and reliability. -Infinitic is very good at orchestrating workflows, ie. at managing the execution of tasks on distributed servers according to any complex scenario. Moreover, Infinitic ensures that a failure somewhere will never break your workflows. +Infinitic is very good at orchestrating workflows, ie. at managing the execution of tasks on distributed servers +according to any complex scenario. Moreover, Infinitic ensures that a failure somewhere will never break your workflows. At last, Infinitic lets us monitor everything occurring inside your app through dashboards. diff --git a/build.gradle.kts b/build.gradle.kts index 9b1ddbc74..6b4fc9d0d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,16 +32,24 @@ buildscript { plugins { id(Plugins.Kotlin.id) version Plugins.Kotlin.version id(Plugins.Serialization.id) version Plugins.Serialization.version apply false - id(Plugins.Ktfmt.id) version Plugins.Ktfmt.version apply true id(Plugins.TestLogger.id) version Plugins.TestLogger.version apply true + id(Plugins.Spotless.id) version Plugins.Spotless.version apply true } +// code quality +spotless { + kotlin { ktfmt() } + kotlinGradle { ktfmt() } +} + +kotlin { jvmToolchain(17) } + repositories { mavenCentral() } subprojects { apply(plugin = Plugins.Kotlin.id) apply(plugin = Plugins.Serialization.id) - apply(plugin = Plugins.Ktfmt.id) + apply(plugin = Plugins.Spotless.id) apply(plugin = Plugins.TestLogger.id) group = Libs.org diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index c25716826..a9d1b4535 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,11 +20,6 @@ * * Licensor: infinitic.io */ +repositories { mavenCentral() } -repositories { - mavenCentral() -} - -plugins { - `kotlin-dsl` -} +plugins { `kotlin-dsl` } diff --git a/buildSrc/src/main/kotlin/Ci.kt b/buildSrc/src/main/kotlin/Ci.kt index ff25eef24..2e12fe2e5 100644 --- a/buildSrc/src/main/kotlin/Ci.kt +++ b/buildSrc/src/main/kotlin/Ci.kt @@ -24,7 +24,7 @@ object Ci { // this is the version used for building snapshots // .GITHUB_RUN_NUMBER-snapshot will be appended - const val base = "0.11.6" + const val base = "0.11.7" private val githubRunNumber = System.getenv("GITHUB_RUN_NUMBER") diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index ebd637e75..9b000155a 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -29,17 +29,17 @@ object Libs { } object Coroutines { - private const val version = "1.7.1" + private const val version = "1.7.3" const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version" const val jdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$version" } object Caffeine { - const val caffeine = "com.github.ben-manes.caffeine:caffeine:3.1.6" + const val caffeine = "com.github.ben-manes.caffeine:caffeine:3.1.8" } object Serialization { - const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1" + const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0" } object JsonPath { @@ -47,7 +47,7 @@ object Libs { } object Jackson { - private const val version = "2.15.2" + private const val version = "2.15.3" const val core = "com.fasterxml.jackson.core:jackson-core:$version" const val databind = "com.fasterxml.jackson.core:jackson-databind:$version" const val kotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:$version" @@ -55,27 +55,27 @@ object Libs { } object Kotest { - private const val version = "5.6.2" + private const val version = "5.7.2" const val property = "io.kotest:kotest-property-jvm:$version" const val junit5 = "io.kotest:kotest-runner-junit5-jvm:$version" } object Mockk { - const val mockk = "io.mockk:mockk:1.13.5" + const val mockk = "io.mockk:mockk:1.13.8" } object Avro4k { - const val core = "com.github.avro-kotlin.avro4k:avro4k-core:1.7.0" + const val core = "com.github.avro-kotlin.avro4k:avro4k-core:1.10.0" } object Hoplite { - private const val version = "2.7.4" + private const val version = "2.7.5" const val core = "com.sksamuel.hoplite:hoplite-core:$version" const val yaml = "com.sksamuel.hoplite:hoplite-yaml:$version" } object Pulsar { - private const val version = "2.11.1" + private const val version = "3.1.0" const val client = "org.apache.pulsar:pulsar-client:$version" const val clientAdmin = "org.apache.pulsar:pulsar-client-admin:$version" const val functions = "org.apache.pulsar:pulsar-functions-api:$version" @@ -84,7 +84,7 @@ object Libs { } object Kweb { - const val core = "io.kweb:kweb-core:1.4.0" + const val core = "io.kweb:kweb-core:1.4.8" } object EasyRandom { @@ -92,7 +92,7 @@ object Libs { } object Slf4j { - private const val version = "2.0.7" + private const val version = "2.0.9" const val simple = "org.slf4j:slf4j-simple:$version" const val api = "org.slf4j:slf4j-api:$version" } @@ -102,6 +102,6 @@ object Libs { } object Compress { - const val commons = "org.apache.commons:commons-compress:1.23.0" + const val commons = "org.apache.commons:commons-compress:1.24.0" } } diff --git a/buildSrc/src/main/kotlin/Plugins.kt b/buildSrc/src/main/kotlin/Plugins.kt index f106d6a45..70c2d1343 100644 --- a/buildSrc/src/main/kotlin/Plugins.kt +++ b/buildSrc/src/main/kotlin/Plugins.kt @@ -20,7 +20,7 @@ * * Licensor: infinitic.io */ -const val kotlinVersion = "1.8.10" +const val kotlinVersion = "1.9.20" object Plugins { object Kotlin { @@ -33,13 +33,13 @@ object Plugins { const val version = kotlinVersion } - object Ktfmt { - const val id = "com.ncorti.ktfmt.gradle" - const val version = "0.12.0" - } - object TestLogger { const val id = "com.adarshr.test-logger" - const val version = "3.2.0" + const val version = "4.0.0" + } + + object Spotless { + const val id = "com.diffplug.spotless" + const val version = "6.22.0" } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a4..c1962a79e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59bc51a20..744c64d12 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..aeb74cbb4 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..93e3f59f1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/infinitic-cache/build.gradle.kts b/infinitic-cache/build.gradle.kts index 80fab34a6..bf6a3f5ba 100644 --- a/infinitic-cache/build.gradle.kts +++ b/infinitic-cache/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,11 +20,10 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Caffeine.caffeine) + implementation(Libs.Caffeine.caffeine) - testImplementation(Libs.Hoplite.yaml) + testImplementation(Libs.Hoplite.yaml) } apply("../publish.gradle.kts") diff --git a/infinitic-cache/src/main/kotlin/io/infinitic/cache/keySet/CachedKeySet.kt b/infinitic-cache/src/main/kotlin/io/infinitic/cache/keySet/CachedKeySet.kt index 39441f1cb..21cd2e5e7 100644 --- a/infinitic-cache/src/main/kotlin/io/infinitic/cache/keySet/CachedKeySet.kt +++ b/infinitic-cache/src/main/kotlin/io/infinitic/cache/keySet/CachedKeySet.kt @@ -26,7 +26,10 @@ import io.infinitic.cache.Flushable interface CachedKeySet : Flushable { fun get(key: String): Set? + fun set(key: String, value: Set) + fun add(key: String, value: T) + fun remove(key: String, value: T) } diff --git a/infinitic-cache/src/main/kotlin/io/infinitic/cache/keyValue/CachedKeyValue.kt b/infinitic-cache/src/main/kotlin/io/infinitic/cache/keyValue/CachedKeyValue.kt index c2544309e..e7b7e1cf2 100644 --- a/infinitic-cache/src/main/kotlin/io/infinitic/cache/keyValue/CachedKeyValue.kt +++ b/infinitic-cache/src/main/kotlin/io/infinitic/cache/keyValue/CachedKeyValue.kt @@ -26,6 +26,8 @@ import io.infinitic.cache.Flushable interface CachedKeyValue : Flushable { fun getValue(key: String): T? + fun putValue(key: String, value: T) + fun delValue(key: String) } diff --git a/infinitic-client-base/build.gradle.kts b/infinitic-client-base/build.gradle.kts index c853aa88a..cd4f9ef9c 100644 --- a/infinitic-client-base/build.gradle.kts +++ b/infinitic-client-base/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,12 +20,11 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Coroutines.jdk8) - implementation(Libs.Kotlin.reflect) + implementation(Libs.Coroutines.jdk8) + implementation(Libs.Kotlin.reflect) - api(project(":infinitic-common")) + api(project(":infinitic-common")) } apply("../publish.gradle.kts") diff --git a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/ClientWorkflowTests.kt b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/ClientWorkflowTests.kt index f8690050f..51d2ed790 100644 --- a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/ClientWorkflowTests.kt +++ b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/ClientWorkflowTests.kt @@ -70,7 +70,7 @@ import io.kotest.matchers.shouldBe import io.mockk.every import io.mockk.mockk import io.mockk.slot -import java.util.UUID +import java.util.* import java.util.concurrent.CopyOnWriteArrayList private val taskTagSlots = CopyOnWriteArrayList() // multithreading update diff --git a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeTask.kt b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeTask.kt index bdf7d3b08..8cfaf9250 100644 --- a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeTask.kt +++ b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeTask.kt @@ -32,12 +32,19 @@ internal interface FakeTaskParent { internal interface FakeTask : FakeTaskParent { fun m0() + fun m0String(): String + fun m1(i: Int): String + fun m2(str: String?): Any? + fun m3(p1: Int, p2: String): String + fun m4(id: FakeInterface): FooTask + fun m5(): Boolean + suspend fun suspendedMethod() } diff --git a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeWorkflow.kt b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeWorkflow.kt index 960fbe99e..c35c0abee 100644 --- a/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeWorkflow.kt +++ b/infinitic-client-base/src/test/kotlin/io/infinitic/clients/samples/FakeWorkflow.kt @@ -34,11 +34,17 @@ internal interface FakeWorkflowParent { internal interface FakeWorkflow : FakeWorkflowParent { fun m0() + fun m1(i: Int?): String + fun m2(str: String): Any? + fun m3(p1: Int, p2: String): String + fun m4(id: FakeInterface): String + suspend fun suspendedMethod() + val channelString: SendChannel val channelFakeTask: SendChannel val channelFakeTaskParent: SendChannel @@ -46,15 +52,23 @@ internal interface FakeWorkflow : FakeWorkflowParent { internal class FakeWorkflowImpl : Workflow(), FakeWorkflow { override fun m0() {} + override fun m1(i: Int?): String = "$i" + override fun m2(str: String): Any? = str + override fun m3(p1: Int, p2: String): String = "$p1$p2" + override fun m4(id: FakeInterface): String = "$id" + override suspend fun suspendedMethod() {} + override val channelString = channel() override val channelFakeTask = channel() override val channelFakeTaskParent = channel() + override fun parent(): String = "foo" + override fun annotated(): String = "foo" } diff --git a/infinitic-client/build.gradle.kts b/infinitic-client/build.gradle.kts index 738cd29de..2e2e20ec7 100644 --- a/infinitic-client/build.gradle.kts +++ b/infinitic-client/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,13 +20,12 @@ * * Licensor: infinitic.io */ - dependencies { - api(project(":infinitic-inMemory")) - api(project(":infinitic-pulsar")) - api(project(":infinitic-client-base")) - api(project(":infinitic-worker-base")) - api(project(":infinitic-worker")) + api(project(":infinitic-inMemory")) + api(project(":infinitic-pulsar")) + api(project(":infinitic-client-base")) + api(project(":infinitic-worker-base")) + api(project(":infinitic-worker")) } apply("../publish.gradle.kts") diff --git a/infinitic-common/build.gradle.kts b/infinitic-common/build.gradle.kts index 564fabd79..a7bf28182 100644 --- a/infinitic-common/build.gradle.kts +++ b/infinitic-common/build.gradle.kts @@ -46,17 +46,17 @@ dependencies { } tasks.withType { - doFirst { - // all versions - val file = File(project.projectDir.absolutePath, "/src/main/resources/versions") - // append current version if not yet present - if (!file.useLines { lines -> lines.any { it == Ci.base } }) { - file.appendText(Ci.base + "\n") - } - - // current version - File(project.projectDir.absolutePath, "/src/main/resources/version").writeText(Ci.base) + doFirst { + // all versions + val file = File(project.projectDir.absolutePath, "/src/main/resources/versions") + // append current version if not yet present + if (!file.useLines { lines -> lines.any { it == Ci.base } }) { + file.appendText(Ci.base + "\n") } + + // current version + File(project.projectDir.absolutePath, "/src/main/resources/version").writeText(Ci.base) } +} apply("../publish.gradle.kts") diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisDuration.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisDuration.kt index 33f969648..b8e73c7f6 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisDuration.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisDuration.kt @@ -50,8 +50,10 @@ data class MillisDuration(val long: Long) : Comparable { object MillisDurationSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("MillisDuration", PrimitiveKind.LONG) + override fun serialize(encoder: Encoder, value: MillisDuration) { encoder.encodeLong(value.long) } + override fun deserialize(decoder: Decoder) = MillisDuration(decoder.decodeLong()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisInstant.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisInstant.kt index 71258d599..09510eac4 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisInstant.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/MillisInstant.kt @@ -51,8 +51,10 @@ data class MillisInstant(val long: Long = 0) : Comparable { object MillisInstantSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("MillisInstant", PrimitiveKind.LONG) + override fun serialize(encoder: Encoder, value: MillisInstant) { encoder.encodeLong(value.long) } + override fun deserialize(decoder: Decoder) = MillisInstant(decoder.decodeLong()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/Name.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/Name.kt index 6484fd9f5..8624be484 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/Name.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/Name.kt @@ -53,8 +53,10 @@ open class Name(open val name: String) : CharSequence by name, Comparable { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Name", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: Name) { encoder.encodeString(value.name) } + override fun deserialize(decoder: Decoder) = Name(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/ReturnValue.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/ReturnValue.kt index be524199f..59a0494e0 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/ReturnValue.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/ReturnValue.kt @@ -42,9 +42,11 @@ data class ReturnValue(val serializedData: SerializedData) { object ReturnValueSerializer : KSerializer { override val descriptor: SerialDescriptor = SerializedData.serializer().descriptor + override fun serialize(encoder: Encoder, value: ReturnValue) { SerializedData.serializer().serialize(encoder, value.serializedData) } + override fun deserialize(decoder: Decoder) = ReturnValue(SerializedData.serializer().deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameterTypes.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameterTypes.kt index 4919e5342..5435136a0 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameterTypes.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameterTypes.kt @@ -40,9 +40,11 @@ data class MethodParameterTypes(val types: List) { object MethodParameterTypesSerializer : KSerializer { override val descriptor: SerialDescriptor = ListSerializer(String.serializer()).descriptor + override fun serialize(encoder: Encoder, value: MethodParameterTypes) { ListSerializer(String.serializer()).serialize(encoder, value.types) } + override fun deserialize(decoder: Decoder) = MethodParameterTypes(ListSerializer(String.serializer()).deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameters.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameters.kt index b02d3a547..d9d200b7e 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameters.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/data/methods/MethodParameters.kt @@ -61,9 +61,11 @@ data class MethodParameters(val parameters: List = listOf()) : object MethodParametersSerializer : KSerializer { override val descriptor: SerialDescriptor = ListSerializer(SerializedData.serializer()).descriptor + override fun serialize(encoder: Encoder, value: MethodParameters) { ListSerializer(SerializedData.serializer()).serialize(encoder, value.parameters.toList()) } + override fun deserialize(decoder: Decoder) = MethodParameters(ListSerializer(SerializedData.serializer()).deserialize(decoder).toList()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/parser/Parser.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/parser/Parser.kt index 2e9fefa32..875c6ad15 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/parser/Parser.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/parser/Parser.kt @@ -37,14 +37,14 @@ fun getMethodPerNameAndParameters( parametersCount: Int ): Method = when (parameterTypes) { - null -> getMethodPerAnnotationAndParametersCount(klass, name, parametersCount) + null -> + getMethodPerAnnotationAndParametersCount(klass, name, parametersCount) ?: getMethodPerNameAndParameterCount(klass, name, parametersCount) - ?: throw NoMethodFoundWithParameterCountException( - klass.name, name, parametersCount) - else -> getMethodPerAnnotationAndParameterTypes(klass, name, parameterTypes) + ?: throw NoMethodFoundWithParameterCountException(klass.name, name, parametersCount) + else -> + getMethodPerAnnotationAndParameterTypes(klass, name, parameterTypes) ?: getMethodPerNameAndParameterTypes(klass, name, parameterTypes) - ?: throw NoMethodFoundWithParameterTypesException( - klass.name, name, parameterTypes) + ?: throw NoMethodFoundWithParameterTypesException(klass.name, name, parameterTypes) } fun classForName(name: String): Class = diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/DurationSerializer.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/DurationSerializer.kt index c0fec8e2d..abdb8c1cb 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/DurationSerializer.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/DurationSerializer.kt @@ -33,6 +33,7 @@ import kotlinx.serialization.encoding.Encoder object DurationSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("DurationLong", PrimitiveKind.LONG) + override fun serialize(encoder: Encoder, value: Duration) { encoder.encodeLong(value.toMillis()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/UUIDSerializer.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/UUIDSerializer.kt index 5d5b15e05..93c647cea 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/UUIDSerializer.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/serDe/kserializer/UUIDSerializer.kt @@ -33,8 +33,10 @@ import kotlinx.serialization.encoding.Encoder object UUIDSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: UUID) { encoder.encodeString(value.toString()) } + override fun deserialize(decoder: Decoder) = UUID.fromString(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/ServiceName.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/ServiceName.kt index 45ffcf426..4715cd837 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/ServiceName.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/ServiceName.kt @@ -37,6 +37,7 @@ data class ServiceName(override val name: String) : Name(name) object ServiceNameSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("ServiceName", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: ServiceName) { encoder.encodeString(value.name) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskMeta.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskMeta.kt index d9ed6f29d..b96c49661 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskMeta.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskMeta.kt @@ -47,8 +47,10 @@ data class TaskMeta(val map: Map = mapOf()) : Map { val ser = MapSerializer(String.serializer(), ByteArraySerializer()) override val descriptor: SerialDescriptor = ser.descriptor + override fun serialize(encoder: Encoder, value: TaskMeta) { ser.serialize(encoder, value.map) } + override fun deserialize(decoder: Decoder) = TaskMeta(ser.deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetryIndex.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetryIndex.kt index 1d4175fa8..32a67996e 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetryIndex.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetryIndex.kt @@ -35,6 +35,7 @@ data class TaskRetryIndex(private val int: Int = 0) : Comparable override fun toString() = "$int" fun toInt() = int + override operator fun compareTo(other: TaskRetryIndex): Int = this.int.compareTo(other.int) operator fun plus(increment: Int) = TaskRetryIndex(this.int + increment) @@ -43,6 +44,7 @@ data class TaskRetryIndex(private val int: Int = 0) : Comparable object TaskRetryIndexSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("TaskRetryIndex", PrimitiveKind.INT) + override fun serialize(encoder: Encoder, value: TaskRetryIndex) { encoder.encodeInt(value.toInt()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetrySequence.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetrySequence.kt index 6352c2d06..c96a5d539 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetrySequence.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskRetrySequence.kt @@ -44,6 +44,7 @@ data class TaskRetrySequence(private val int: Int = 0) : Comparable { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("TaskRetrySequence", PrimitiveKind.INT) + override fun serialize(encoder: Encoder, value: TaskRetrySequence) { encoder.encodeInt(value.toInt()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskTag.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskTag.kt index 757e19e1e..2663b20a9 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskTag.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/tasks/data/TaskTag.kt @@ -38,8 +38,10 @@ data class TaskTag(val tag: String) { object TaskTagSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("TaskTag", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: TaskTag) { encoder.encodeString(value.tag) } + override fun deserialize(decoder: Decoder) = TaskTag(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workers/registry/RegisteredWorkflow.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workers/registry/RegisteredWorkflow.kt index 451a2f8a5..8b506ec84 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workers/registry/RegisteredWorkflow.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workers/registry/RegisteredWorkflow.kt @@ -63,6 +63,7 @@ data class RegisteredWorkflow( private val classByVersion by lazy { classes.associateBy { WorkflowVersion.from(it) } } private val lastVersion by lazy { classByVersion.keys.maxOrNull() ?: thisShouldNotHappen() } + fun getInstance(workflowVersion: WorkflowVersion?): Workflow = getClass(workflowVersion).getDeclaredConstructor().newInstance() diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelFilter.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelFilter.kt index 8be70c5cf..c814ea3b1 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelFilter.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelFilter.kt @@ -51,7 +51,9 @@ data class ChannelFilter(val jsonPath: String, val filter: String? = null) { Configuration.setDefaults( object : Configuration.Defaults { override fun jsonProvider() = JacksonJsonProvider() + override fun mappingProvider() = JacksonMappingProvider() + override fun options() = setOf(Option.ALWAYS_RETURN_LIST) }) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelName.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelName.kt index 33615621a..264f89c6d 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelName.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelName.kt @@ -31,6 +31,7 @@ import kotlinx.serialization.Serializable value class ChannelName(private val name: String) { companion object { fun from(method: Method) = ChannelName(method.name) + fun from(methodName: MethodName) = ChannelName(methodName.toString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelType.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelType.kt index 6c56210e7..f6ecf308e 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelType.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/ChannelType.kt @@ -35,6 +35,7 @@ import kotlinx.serialization.encoding.Encoder data class ChannelType(override val name: String) : Name(name) { companion object { fun from(klass: Class) = ChannelType(klass.name) + fun allFrom(klass: Class) = getAllExtendedOrImplementedTypes(klass) } } @@ -42,8 +43,10 @@ data class ChannelType(override val name: String) : Name(name) { object ChannelTypeSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("ChannelType", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: ChannelType) { encoder.encodeString(value.name) } + override fun deserialize(decoder: Decoder) = ChannelType(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/SignalData.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/SignalData.kt index b4a1bf035..3502703fb 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/SignalData.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/channels/SignalData.kt @@ -40,9 +40,11 @@ data class SignalData(val serializedData: SerializedData) { object ChannelSignalSerializer : KSerializer { override val descriptor: SerialDescriptor = SerializedData.serializer().descriptor + override fun serialize(encoder: Encoder, value: SignalData) { SerializedData.serializer().serialize(encoder, value.serializedData) } + override fun deserialize(decoder: Decoder) = SignalData(SerializedData.serializer().deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandHash.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandHash.kt index 08bdb43cc..93d0e976d 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandHash.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandHash.kt @@ -37,8 +37,10 @@ data class CommandHash(override val hash: String) : Hash(hash) object CommandHashSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("CommandHash", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: CommandHash) { encoder.encodeString(value.hash) } + override fun deserialize(decoder: Decoder) = CommandHash(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandId.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandId.kt index 41bf19bc9..fffacb166 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandId.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandId.kt @@ -34,8 +34,11 @@ import kotlinx.serialization.Serializable value class CommandId(private val id: String = UUID.randomUUID().toString()) { companion object { fun from(taskId: TaskId) = CommandId(taskId.toString()) + fun from(workflowId: WorkflowId) = CommandId(workflowId.toString()) + fun from(methodRunId: MethodRunId) = CommandId(methodRunId.toString()) + fun from(timerId: TimerId) = CommandId(timerId.toString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandStatus.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandStatus.kt index cdbb50984..2d9214db3 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandStatus.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/commands/CommandStatus.kt @@ -45,6 +45,7 @@ sealed class CommandStatus { @SerialName("CommandStatus.Ongoing") object Ongoing : CommandStatus() { override fun equals(other: Any?) = javaClass == other?.javaClass + override fun toString(): String = Ongoing::class.java.name } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyHash.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyHash.kt index 5d1ffe259..02011e8a6 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyHash.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyHash.kt @@ -37,8 +37,10 @@ data class PropertyHash(override val hash: String) : Hash(hash) object PropertyHashSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("PropertyHash", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: PropertyHash) { encoder.encodeString(value.hash) } + override fun deserialize(decoder: Decoder) = PropertyHash(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyName.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyName.kt index 1b988aebe..cb6b23e65 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyName.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyName.kt @@ -37,8 +37,10 @@ data class PropertyName(override val name: String) : Name(name) object PropertyNameSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("PropertyName", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: PropertyName) { encoder.encodeString(value.name) } + override fun deserialize(decoder: Decoder) = PropertyName(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyValue.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyValue.kt index e6086c739..1a0138658 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyValue.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/properties/PropertyValue.kt @@ -44,9 +44,11 @@ data class PropertyValue(val serializedData: SerializedData) { object PropertyValueSerializer : KSerializer { override val descriptor: SerialDescriptor = SerializedData.serializer().descriptor + override fun serialize(encoder: Encoder, value: PropertyValue) { SerializedData.serializer().serialize(encoder, value.serializedData) } + override fun deserialize(decoder: Decoder) = PropertyValue(SerializedData.serializer().deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/Step.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/Step.kt index 78158d3c3..ba279206a 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/Step.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/Step.kt @@ -122,6 +122,7 @@ sealed class Step { throw OutOfBoundAwaitException } } + override fun nextAwaitIndex() { awaitIndex++ @@ -237,6 +238,7 @@ sealed class Step { override fun checkAwaitIndex() { steps.map { it.checkAwaitIndex() } } + override fun nextAwaitIndex() { steps.map { it.nextAwaitIndex() } } @@ -290,8 +292,7 @@ sealed class Step { else -> commandStatuses.firstOrNull { it is Completed && it.returnIndex == awaitIndex - } - ?: thisShouldNotHappen() + } ?: thisShouldNotHappen() } } is And -> steps = steps.map { it.updateWith(commandId, commandStatus, commandStatuses) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/StepHash.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/StepHash.kt index 39e07f307..adb928459 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/StepHash.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/steps/StepHash.kt @@ -37,8 +37,10 @@ data class StepHash(override val hash: String) : Hash(hash) object StepHashSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("StepHash", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: StepHash) { encoder.encodeString(value.hash) } + override fun deserialize(decoder: Decoder) = StepHash(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflowTasks/WorkflowTaskIndex.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflowTasks/WorkflowTaskIndex.kt index 2e937e427..492a890e0 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflowTasks/WorkflowTaskIndex.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflowTasks/WorkflowTaskIndex.kt @@ -42,8 +42,10 @@ data class WorkflowTaskIndex(val int: Int = 0) : Comparable { object WorkflowTaskIndexSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("WorkflowTaskIndex", PrimitiveKind.INT) + override fun serialize(encoder: Encoder, value: WorkflowTaskIndex) { encoder.encodeInt(value.int) } + override fun deserialize(decoder: Decoder) = WorkflowTaskIndex(decoder.decodeInt()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowMeta.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowMeta.kt index f245645b3..e5d92dfa7 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowMeta.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowMeta.kt @@ -51,8 +51,10 @@ data class WorkflowMeta(val map: Map = mapOf()) : Map { val ser = MapSerializer(String.serializer(), ByteArraySerializer()) override val descriptor: SerialDescriptor = ser.descriptor + override fun serialize(encoder: Encoder, value: WorkflowMeta) { ser.serialize(encoder, value.map) } + override fun deserialize(decoder: Decoder) = WorkflowMeta(ser.deserialize(decoder)) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowName.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowName.kt index e5d219414..0e2faeed8 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowName.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowName.kt @@ -42,8 +42,10 @@ data class WorkflowName(override val name: String) : Name(name) { object WorkflowNameSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("WorkflowName", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: WorkflowName) { encoder.encodeString(value.name) } + override fun deserialize(decoder: Decoder) = WorkflowName(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowTag.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowTag.kt index 855c7d463..473aa4e26 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowTag.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/data/workflows/WorkflowTag.kt @@ -44,8 +44,10 @@ data class WorkflowTag(val tag: String) { object WorkflowTagSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("WorkflowTag", PrimitiveKind.STRING) + override fun serialize(encoder: Encoder, value: WorkflowTag) { encoder.encodeString(value.tag) } + override fun deserialize(decoder: Decoder) = WorkflowTag(decoder.decodeString()) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/messages/WorkflowEngineMessage.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/messages/WorkflowEngineMessage.kt index 46f0ead9c..f31ce9825 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/messages/WorkflowEngineMessage.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/messages/WorkflowEngineMessage.kt @@ -65,6 +65,7 @@ interface MethodEvent : WorkflowEvent { interface TaskEvent : MethodEvent { fun taskId(): TaskId + fun serviceName(): ServiceName } @@ -242,6 +243,7 @@ data class TaskCanceled( override val emitterName: ClientName ) : WorkflowEngineMessage(), TaskEvent { override fun taskId() = canceledTaskError.taskId + override fun serviceName() = canceledTaskError.serviceName } @@ -256,6 +258,7 @@ data class TaskFailed( override val emitterName: ClientName ) : WorkflowEngineMessage(), TaskEvent { override fun taskId() = failedTaskError.taskId + override fun serviceName() = failedTaskError.serviceName } @@ -269,5 +272,6 @@ data class TaskCompleted( override val emitterName: ClientName ) : WorkflowEngineMessage(), TaskEvent { override fun taskId() = taskReturnValue.taskId + override fun serviceName() = taskReturnValue.serviceName } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/state/WorkflowState.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/state/WorkflowState.kt index d0a0408eb..d5fdfe381 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/state/WorkflowState.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/state/WorkflowState.kt @@ -136,8 +136,8 @@ data class WorkflowState( fun getPastCommand(commandId: CommandId, methodRun: MethodRun): PastCommand = methodRun.getPastCommand(commandId) - // if we do not find in this methodRun, then search within others - ?: methodRuns.map { it.getPastCommand(commandId) }.firstOrNull { it != null } + // if we do not find in this methodRun, then search within others + ?: methodRuns.map { it.getPastCommand(commandId) }.firstOrNull { it != null } // methodRun should not be deleted if a step is still running ?: thisShouldNotHappen() diff --git a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/storage/WorkflowStateStorage.kt b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/storage/WorkflowStateStorage.kt index ae86ecb80..b90a55f33 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/storage/WorkflowStateStorage.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/common/workflows/engine/storage/WorkflowStateStorage.kt @@ -28,6 +28,8 @@ import io.infinitic.common.workflows.engine.state.WorkflowState interface WorkflowStateStorage : Flushable { suspend fun getState(workflowId: WorkflowId): WorkflowState? + suspend fun putState(workflowId: WorkflowId, workflowState: WorkflowState) + suspend fun delState(workflowId: WorkflowId) } diff --git a/infinitic-common/src/main/kotlin/io/infinitic/workflows/Deferred.kt b/infinitic-common/src/main/kotlin/io/infinitic/workflows/Deferred.kt index e2335bb22..9e0513a52 100644 --- a/infinitic-common/src/main/kotlin/io/infinitic/workflows/Deferred.kt +++ b/infinitic-common/src/main/kotlin/io/infinitic/workflows/Deferred.kt @@ -84,9 +84,11 @@ data class Deferred(val step: Step) { object DeferredSerializer : KSerializer> { override val descriptor: SerialDescriptor = Step.serializer().descriptor + override fun serialize(encoder: Encoder, value: Deferred<*>) { encoder.encodeSerializableValue(Step.serializer(), value.step) } + override fun deserialize(decoder: Decoder): Deferred<*> = Deferred(decoder.decodeSerializableValue(Step.serializer())) } diff --git a/infinitic-common/src/main/resources/schemas/clientEnvelope-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/clientEnvelope-0.11.7.avsc new file mode 100644 index 000000000..2aa7af107 --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/clientEnvelope-0.11.7.avsc @@ -0,0 +1,431 @@ +{ + "type" : "record", + "name" : "ClientEnvelope", + "namespace" : "io.infinitic.common.clients.messages", + "fields" : [ { + "name" : "clientName", + "type" : "string" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "ClientMessageType", + "symbols" : [ "TASK_COMPLETED", "TASK_CANCELED", "TASK_FAILED", "TASK_IDS_PER_TAG", "UNKNOWN_WORKFLOW", "WORKFLOW_COMPLETED", "WORKFLOW_CANCELED", "WORKFLOW_FAILED", "WORKFLOW_ALREADY_COMPLETED", "WORKFLOW_IDS_PER_TAG" ] + } + }, { + "name" : "taskCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "TaskCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "taskReturnValue", + "type" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } ] + }, { + "name" : "taskCanceled", + "type" : [ "null", { + "type" : "record", + "name" : "TaskCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "taskFailed", + "type" : [ "null", { + "type" : "record", + "name" : "TaskFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "cause", + "type" : { + "type" : "record", + "name" : "WorkerError", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "taskIdsByTag", + "type" : [ "null", { + "type" : "record", + "name" : "TaskIdsByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "taskIds", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "workflowCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "MethodCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "methodReturnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "workflowCanceled", + "type" : [ "null", { + "type" : "record", + "name" : "MethodCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "workflowFailed", + "type" : [ "null", { + "type" : "record", + "name" : "MethodFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "cause", + "type" : [ { + "type" : "record", + "name" : "CanceledTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CanceledWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "FailedTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "FailedWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "deferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", { + "type" : "record", + "name" : "FailedWorkflowTaskError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowTaskId", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "TimedOutTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimedOutWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "UnknownTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "UnknownWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + } ] + }, "FailedWorkflowTaskError", "TimedOutTaskError", "TimedOutWorkflowError", "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "unknownWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "MethodRunUnknown", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "methodAlreadyCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "MethodAlreadyCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "workflowIdsByTag", + "type" : [ "null", { + "type" : "record", + "name" : "WorkflowIdsByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "recipientName", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "workflowIds", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/taskExecutorEnvelope-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/taskExecutorEnvelope-0.11.7.avsc new file mode 100644 index 000000000..fd990b954 --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/taskExecutorEnvelope-0.11.7.avsc @@ -0,0 +1,124 @@ +{ + "type" : "record", + "name" : "TaskExecutorEnvelope", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "TaskExecutorMessageType", + "symbols" : [ "EXECUTE_TASK" ] + } + }, { + "name" : "executeTask", + "type" : [ "null", { + "type" : "record", + "name" : "ExecuteTask", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + }, { + "name" : "taskRetrySequence", + "type" : "int" + }, { + "name" : "taskRetryIndex", + "type" : "int" + }, { + "name" : "lastError", + "type" : [ "null", { + "type" : "record", + "name" : "WorkerError", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } ] + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowName", + "type" : [ "null", "string" ] + }, { + "name" : "workflowVersion", + "type" : [ "null", "int" ], + "default" : null + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "taskTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } ] + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/taskTagEnvelope-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/taskTagEnvelope-0.11.7.avsc new file mode 100644 index 000000000..a410b4ab9 --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/taskTagEnvelope-0.11.7.avsc @@ -0,0 +1,117 @@ +{ + "type" : "record", + "name" : "TaskTagEnvelope", + "namespace" : "io.infinitic.tasks.tag", + "fields" : [ { + "name" : "name", + "type" : "string" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "TaskTagMessageType", + "symbols" : [ "ADD_TAG_TO_TASK", "REMOVE_TAG_FROM_TASK", "CANCEL_TASK_BY_TAG", "RETRY_TASK_BY_TAG", "GET_TASK_IDS_BY_TAG" ] + } + }, { + "name" : "addTagToTask", + "type" : [ "null", { + "type" : "record", + "name" : "AddTagToTask", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "removeTagFromTask", + "type" : [ "null", { + "type" : "record", + "name" : "RemoveTagFromTask", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "cancelTaskByTag", + "type" : [ "null", { + "type" : "record", + "name" : "CancelTaskByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "retryTaskByTag", + "type" : [ "null", { + "type" : "record", + "name" : "RetryTaskByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "getTaskIdsByTag", + "type" : [ "null", { + "type" : "record", + "name" : "GetTaskIdsByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskTag", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/workflowEngineEnvelope-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/workflowEngineEnvelope-0.11.7.avsc new file mode 100644 index 000000000..792689cee --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/workflowEngineEnvelope-0.11.7.avsc @@ -0,0 +1,716 @@ +{ + "type" : "record", + "name" : "WorkflowEngineEnvelope", + "namespace" : "io.infinitic.workflows.engine", + "fields" : [ { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "WorkflowEngineMessageType", + "symbols" : [ "WAIT_WORKFLOW", "CANCEL_WORKFLOW", "RETRY_WORKFLOW_TASK", "RETRY_TASKS", "COMPLETE_TIMERS", "COMPLETE_WORKFLOW", "SEND_SIGNAL", "DISPATCH_WORKFLOW", "DISPATCH_METHOD", "TIMER_COMPLETED", "CHILD_WORKFLOW_UNKNOWN", "CHILD_WORKFLOW_CANCELED", "CHILD_WORKFLOW_FAILED", "CHILD_WORKFLOW_COMPLETED", "TASK_CANCELED", "TASK_FAILED", "TASK_COMPLETED" ] + } + }, { + "name" : "dispatchWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "DispatchWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "dispatchMethod", + "type" : [ "null", { + "type" : "record", + "name" : "DispatchMethod", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "waitWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "WaitWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "cancelWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "CancelWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "reason", + "type" : { + "type" : "enum", + "name" : "WorkflowCancellationReason", + "namespace" : "io.infinitic.workflows.data", + "symbols" : [ "CANCELED_BY_CLIENT", "CANCELED_BY_PARENT" ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "retryWorkflowTask", + "type" : [ "null", { + "type" : "record", + "name" : "RetryWorkflowTask", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "retryTasks", + "type" : [ "null", { + "type" : "record", + "name" : "RetryTasks", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "taskId", + "type" : [ "null", "string" ] + }, { + "name" : "taskStatus", + "type" : [ "null", { + "type" : "enum", + "name" : "DeferredStatus", + "namespace" : "io.infinitic.workflows", + "symbols" : [ "ONGOING", "UNKNOWN", "CANCELED", "FAILED", "COMPLETED" ] + } ] + }, { + "name" : "taskName", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "completeTimers", + "type" : [ "null", { + "type" : "record", + "name" : "CompleteTimers", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ], + "default" : null + }, { + "name" : "completeWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "CompleteWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowReturnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "sendSignal", + "type" : [ "null", { + "type" : "record", + "name" : "SendSignal", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalId", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "timerCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "TimerCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "timerId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "childMethodUnknown", + "type" : [ "null", { + "type" : "record", + "name" : "ChildMethodUnknown", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childUnknownWorkflowError", + "type" : { + "type" : "record", + "name" : "UnknownWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "childMethodCanceled", + "type" : [ "null", { + "type" : "record", + "name" : "ChildMethodCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childCanceledWorkflowError", + "type" : { + "type" : "record", + "name" : "CanceledWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "childMethodFailed", + "type" : [ "null", { + "type" : "record", + "name" : "ChildMethodFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childFailedWorkflowError", + "type" : { + "type" : "record", + "name" : "FailedWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "deferredError", + "type" : [ { + "type" : "record", + "name" : "CanceledTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, "CanceledWorkflowError", { + "type" : "record", + "name" : "FailedTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "cause", + "type" : { + "type" : "record", + "name" : "WorkerError", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } + } ] + }, "FailedWorkflowError", { + "type" : "record", + "name" : "FailedWorkflowTaskError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowTaskId", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "TimedOutTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimedOutWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "UnknownTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + } ] + }, "UnknownWorkflowError" ] + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "childMethodCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "ChildMethodCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childWorkflowReturnValue", + "type" : { + "type" : "record", + "name" : "WorkflowReturnValue", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "taskCanceled", + "type" : [ "null", { + "type" : "record", + "name" : "TaskCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "canceledTaskError", + "type" : "CanceledTaskError" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "taskFailed", + "type" : [ "null", { + "type" : "record", + "name" : "TaskFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "failedTaskError", + "type" : "FailedTaskError" + }, { + "name" : "deferredError", + "type" : [ "null", "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError", "TimedOutTaskError", "TimedOutWorkflowError", "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "taskCompleted", + "type" : [ "null", { + "type" : "record", + "name" : "TaskCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "taskReturnValue", + "type" : { + "type" : "record", + "name" : "TaskReturnValue", + "namespace" : "io.infinitic.tasks.data", + "fields" : [ { + "name" : "taskId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/workflowState-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/workflowState-0.11.7.avsc new file mode 100644 index 000000000..a1d0003a2 --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/workflowState-0.11.7.avsc @@ -0,0 +1,1352 @@ +{ + "type" : "record", + "name" : "WorkflowState", + "namespace" : "io.infinitic.workflows.engine", + "fields" : [ { + "name" : "lastMessageId", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowVersion", + "type" : [ "null", "int" ], + "default" : null + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "runningWorkflowTaskId", + "type" : [ "null", "string" ] + }, { + "name" : "runningMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "runningMethodRunPosition", + "type" : [ "null", "int" ] + }, { + "name" : "runningTerminatedCommands", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "runningWorkflowTaskInstant", + "type" : [ "null", "long" ] + }, { + "name" : "workflowTaskIndex", + "type" : "int" + }, { + "name" : "methodRuns", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "MethodRun", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "waitingClients", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + }, { + "name" : "methodReturnValue", + "type" : [ "null", "io.infinitic.data.SerializedData" ] + }, { + "name" : "workflowTaskIndexAtStart", + "type" : "int" + }, { + "name" : "propertiesNameHashAtStart", + "type" : { + "type" : "map", + "values" : "string" + } + }, { + "name" : "pastCommands", + "type" : { + "type" : "array", + "items" : [ { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ { + "type" : "record", + "name" : "Canceled", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "canceledDeferredError", + "type" : [ { + "type" : "record", + "name" : "CanceledTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CanceledWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "cancellationWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Completed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "returnIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "completionWorkflowTaskIndex", + "type" : "int" + }, { + "name" : "signalId", + "type" : [ "null", "string" ], + "default" : null + } ] + }, { + "type" : "record", + "name" : "Failed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ { + "type" : "record", + "name" : "FailedTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "cause", + "type" : { + "type" : "record", + "name" : "WorkerError", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } + } ] + }, { + "type" : "record", + "name" : "FailedWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "deferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", { + "type" : "record", + "name" : "FailedWorkflowTaskError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowTaskId", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "TimedOutTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimedOutWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "UnknownTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "UnknownWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + } ] + }, "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Ongoing", + "namespace" : "CommandStatus", + "fields" : [ ] + }, { + "type" : "record", + "name" : "Unknown", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "unknownDeferredError", + "type" : [ "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "unknowingWorkflowTaskIndex", + "type" : "int" + } ] + } ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "Command", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "taskTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "taskRetrySequence", + "type" : "int" + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "InlineTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "InlineTask", + "namespace" : "Command", + "fields" : [ { + "name" : "task", + "type" : "string" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalType", + "type" : [ "null", "string" ] + }, { + "name" : "channelEventFilter", + "type" : [ "null", { + "type" : "record", + "name" : "ChannelEventFilter", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "jsonPath", + "type" : "string" + }, { + "name" : "filter", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "receivedSignalLimit", + "type" : [ "int", "null" ], + "default" : 1 + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + }, { + "name" : "commandStatuses", + "type" : { + "type" : "array", + "items" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, + "default" : [ ] + } ] + }, { + "type" : "record", + "name" : "SendSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "SendSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "duration", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "instant", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + } ] + } + }, { + "name" : "pastSteps", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "PastStep", + "fields" : [ { + "name" : "stepPosition", + "type" : "int" + }, { + "name" : "step", + "type" : [ { + "type" : "record", + "name" : "And", + "namespace" : "Step", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", { + "type" : "record", + "name" : "Id", + "fields" : [ { + "name" : "commandId", + "type" : "string" + }, { + "name" : "awaitIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + } ] + }, { + "type" : "record", + "name" : "Or", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", "Id", "Or" ] + } + } ] + } ] + } + } ] + }, "Step.Id", "Step.Or" ] + }, { + "name" : "stepHash", + "type" : "string" + }, { + "name" : "workflowTaskIndexAtStart", + "type" : "int" + }, { + "name" : "stepStatus", + "type" : [ { + "type" : "record", + "name" : "Canceled", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "canceledDeferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError" ] + }, { + "name" : "cancellationWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Completed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "completionWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "CurrentlyFailed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Failed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Unknown", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "unknownDeferredError", + "type" : [ "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "unknowingWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Waiting", + "namespace" : "StepStatus", + "fields" : [ ] + } ] + }, { + "name" : "propertiesNameHashAtTermination", + "type" : [ "null", { + "type" : "map", + "values" : "string" + } ] + }, { + "name" : "workflowTaskIndexAtTermination", + "type" : [ "null", "int" ] + } ] + } + } + }, { + "name" : "currentStep", + "type" : [ "null", "PastStep" ] + } ] + } + } + }, { + "name" : "receivingChannels", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "ReceivingChannel", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalType", + "type" : [ "null", "string" ] + }, { + "name" : "channelEventFilter", + "type" : [ "null", "ChannelEventFilter" ] + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "commandId", + "type" : "string" + }, { + "name" : "receivedSignalLimit", + "type" : [ "int", "null" ], + "default" : 1 + }, { + "name" : "receivedSignalCount", + "type" : "int", + "default" : 0 + } ] + } + } + }, { + "name" : "currentPropertiesNameHash", + "type" : { + "type" : "map", + "values" : "string" + } + }, { + "name" : "propertiesHashValue", + "type" : { + "type" : "map", + "values" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "messagesBuffer", + "type" : { + "type" : "array", + "items" : [ { + "type" : "record", + "name" : "CancelWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "reason", + "type" : { + "type" : "enum", + "name" : "WorkflowCancellationReason", + "namespace" : "io.infinitic.workflows.data", + "symbols" : [ "CANCELED_BY_CLIENT", "CANCELED_BY_PARENT" ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ChildMethodCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childCanceledWorkflowError", + "type" : "CanceledWorkflowError" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ChildMethodCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childWorkflowReturnValue", + "type" : { + "type" : "record", + "name" : "WorkflowReturnValue", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ChildMethodFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childFailedWorkflowError", + "type" : "FailedWorkflowError" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ChildMethodUnknown", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "childUnknownWorkflowError", + "type" : "UnknownWorkflowError" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CompleteTimers", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CompleteWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowReturnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchMethod", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "RetryTasks", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "taskId", + "type" : [ "null", "string" ] + }, { + "name" : "taskStatus", + "type" : [ "null", { + "type" : "enum", + "name" : "DeferredStatus", + "namespace" : "io.infinitic.workflows", + "symbols" : [ "ONGOING", "UNKNOWN", "CANCELED", "FAILED", "COMPLETED" ] + } ] + }, { + "name" : "taskName", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "RetryWorkflowTask", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "SendSignal", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalId", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TaskCanceled", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "canceledTaskError", + "type" : "CanceledTaskError" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TaskCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "taskReturnValue", + "type" : { + "type" : "record", + "name" : "TaskReturnValue", + "namespace" : "io.infinitic.tasks.data", + "fields" : [ { + "name" : "taskId", + "type" : "string" + }, { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TaskFailed", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "failedTaskError", + "type" : "FailedTaskError" + }, { + "name" : "deferredError", + "type" : [ "null", "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError", "TimedOutTaskError", "TimedOutWorkflowError", "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimerCompleted", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "timerId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "WaitWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + } + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/workflowTagEnvelope-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/workflowTagEnvelope-0.11.7.avsc new file mode 100644 index 000000000..c7f897aca --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/workflowTagEnvelope-0.11.7.avsc @@ -0,0 +1,353 @@ +{ + "type" : "record", + "name" : "WorkflowTagEnvelope", + "namespace" : "io.infinitic.workflows.tag", + "fields" : [ { + "name" : "name", + "type" : "string" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "WorkflowTagMessageType", + "symbols" : [ "DISPATCH_WORKFLOW_BY_CUSTOM_ID", "DISPATCH_METHOD_BY_TAG", "ADD_TAG_TO_WORKFLOW", "REMOVE_TAG_FROM_WORKFLOW", "SEND_SIGNAL_BY_TAG", "CANCEL_WORKFLOW_BY_TAG", "RETRY_WORKFLOW_TASK_BY_TAG", "RETRY_TASKS_BY_TAG", "COMPLETE_TIMER_BY_TAG", "GET_WORKFLOW_IDS_BY_TAG" ] + } + }, { + "name" : "dispatchWorkflowByCustomId", + "type" : [ "null", { + "type" : "record", + "name" : "DispatchWorkflowByCustomId", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ], + "default" : null + }, { + "name" : "dispatchMethodByTag", + "type" : [ "null", { + "type" : "record", + "name" : "DispatchMethodByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "clientWaiting", + "type" : "boolean" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "addTagToWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "AddTagToWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "removeTagFromWorkflow", + "type" : [ "null", { + "type" : "record", + "name" : "RemoveTagFromWorkflow", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "sendSignalByTag", + "type" : [ "null", { + "type" : "record", + "name" : "SendSignalByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalId", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "emitterWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "cancelWorkflowByTag", + "type" : [ "null", { + "type" : "record", + "name" : "CancelWorkflowByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "reason", + "type" : { + "type" : "enum", + "name" : "WorkflowCancellationReason", + "namespace" : "io.infinitic.workflows.data", + "symbols" : [ "CANCELED_BY_CLIENT", "CANCELED_BY_PARENT" ] + } + }, { + "name" : "emitterWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "retryWorkflowTaskByTag", + "type" : [ "null", { + "type" : "record", + "name" : "RetryWorkflowTaskByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "retryTasksByTag", + "type" : [ "null", { + "type" : "record", + "name" : "RetryTasksByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "taskId", + "type" : [ "null", "string" ] + }, { + "name" : "taskStatus", + "type" : [ "null", { + "type" : "enum", + "name" : "DeferredStatus", + "namespace" : "io.infinitic.workflows", + "symbols" : [ "ONGOING", "UNKNOWN", "CANCELED", "FAILED", "COMPLETED" ] + } ] + }, { + "name" : "taskName", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + }, { + "name" : "completeTimersByTag", + "type" : [ "null", { + "type" : "record", + "name" : "CompleteTimersByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ], + "default" : null + }, { + "name" : "getWorkflowIdsByTag", + "type" : [ "null", { + "type" : "record", + "name" : "GetWorkflowIdsByTag", + "fields" : [ { + "name" : "messageId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowTag", + "type" : "string" + }, { + "name" : "emitterName", + "type" : "string" + } ] + } ] + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/workflowTaskParameters-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/workflowTaskParameters-0.11.7.avsc new file mode 100644 index 000000000..d030e5a4b --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/workflowTaskParameters-0.11.7.avsc @@ -0,0 +1,817 @@ +{ + "type" : "record", + "name" : "WorkflowTaskParameters", + "namespace" : "io.infinitic.common.workflows.data.workflowTasks", + "fields" : [ { + "name" : "version", + "type" : "string", + "default" : "0.9.7" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowVersion", + "type" : [ "null", "int" ], + "default" : null + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + }, { + "name" : "workflowPropertiesHashValue", + "type" : { + "type" : "map", + "values" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + }, { + "name" : "workflowTaskIndex", + "type" : "int" + }, { + "name" : "methodRun", + "type" : { + "type" : "record", + "name" : "MethodRun", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "waitingClients", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodRunId", + "type" : "string" + }, { + "name" : "parentWorkflowId", + "type" : [ "null", "string" ] + }, { + "name" : "parentWorkflowName", + "type" : [ "null", "string" ] + }, { + "name" : "parentMethodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : [ "null", { + "type" : "array", + "items" : "string" + } ] + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "methodReturnValue", + "type" : [ "null", "io.infinitic.data.SerializedData" ] + }, { + "name" : "workflowTaskIndexAtStart", + "type" : "int" + }, { + "name" : "propertiesNameHashAtStart", + "type" : { + "type" : "map", + "values" : "string" + } + }, { + "name" : "pastCommands", + "type" : { + "type" : "array", + "items" : [ { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ { + "type" : "record", + "name" : "Canceled", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "canceledDeferredError", + "type" : [ { + "type" : "record", + "name" : "CanceledTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CanceledWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "cancellationWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Completed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "returnIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "completionWorkflowTaskIndex", + "type" : "int" + }, { + "name" : "signalId", + "type" : [ "null", "string" ], + "default" : null + } ] + }, { + "type" : "record", + "name" : "Failed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ { + "type" : "record", + "name" : "FailedTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "cause", + "type" : { + "type" : "record", + "name" : "WorkerError", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } + } ] + }, { + "type" : "record", + "name" : "FailedWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "deferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", { + "type" : "record", + "name" : "FailedWorkflowTaskError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowTaskId", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "TimedOutTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimedOutWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "UnknownTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "UnknownWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + } ] + }, "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Ongoing", + "namespace" : "CommandStatus", + "fields" : [ ] + }, { + "type" : "record", + "name" : "Unknown", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "unknownDeferredError", + "type" : [ "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "unknowingWorkflowTaskIndex", + "type" : "int" + } ] + } ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "Command", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "taskTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "taskRetrySequence", + "type" : "int" + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "InlineTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "InlineTask", + "namespace" : "Command", + "fields" : [ { + "name" : "task", + "type" : "string" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalType", + "type" : [ "null", "string" ] + }, { + "name" : "channelEventFilter", + "type" : [ "null", { + "type" : "record", + "name" : "ChannelEventFilter", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "jsonPath", + "type" : "string" + }, { + "name" : "filter", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "receivedSignalLimit", + "type" : [ "int", "null" ], + "default" : 1 + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + }, { + "name" : "commandStatuses", + "type" : { + "type" : "array", + "items" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, + "default" : [ ] + } ] + }, { + "type" : "record", + "name" : "SendSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "SendSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "duration", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "instant", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + } ] + } + }, { + "name" : "pastSteps", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "PastStep", + "fields" : [ { + "name" : "stepPosition", + "type" : "int" + }, { + "name" : "step", + "type" : [ { + "type" : "record", + "name" : "And", + "namespace" : "Step", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", { + "type" : "record", + "name" : "Id", + "fields" : [ { + "name" : "commandId", + "type" : "string" + }, { + "name" : "awaitIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + } ] + }, { + "type" : "record", + "name" : "Or", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", "Id", "Or" ] + } + } ] + } ] + } + } ] + }, "Step.Id", "Step.Or" ] + }, { + "name" : "stepHash", + "type" : "string" + }, { + "name" : "workflowTaskIndexAtStart", + "type" : "int" + }, { + "name" : "stepStatus", + "type" : [ { + "type" : "record", + "name" : "Canceled", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "canceledDeferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError" ] + }, { + "name" : "cancellationWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Completed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "completionWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "CurrentlyFailed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Failed", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ "FailedTaskError", "FailedWorkflowError", "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Unknown", + "namespace" : "StepStatus", + "fields" : [ { + "name" : "unknownDeferredError", + "type" : [ "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "unknowingWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Waiting", + "namespace" : "StepStatus", + "fields" : [ ] + } ] + }, { + "name" : "propertiesNameHashAtTermination", + "type" : [ "null", { + "type" : "map", + "values" : "string" + } ] + }, { + "name" : "workflowTaskIndexAtTermination", + "type" : [ "null", "int" ] + } ] + } + } + }, { + "name" : "currentStep", + "type" : [ "null", "PastStep" ] + } ] + } + }, { + "name" : "emitterName", + "type" : "string" + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/schemas/workflowTaskReturnValue-0.11.7.avsc b/infinitic-common/src/main/resources/schemas/workflowTaskReturnValue-0.11.7.avsc new file mode 100644 index 000000000..2a765ed0d --- /dev/null +++ b/infinitic-common/src/main/resources/schemas/workflowTaskReturnValue-0.11.7.avsc @@ -0,0 +1,660 @@ +{ + "type" : "record", + "name" : "WorkflowTaskReturnValue", + "namespace" : "io.infinitic.common.workflows.data.workflowTasks", + "fields" : [ { + "name" : "version", + "type" : "string", + "default" : "0.9.7" + }, { + "name" : "newCommands", + "type" : { + "type" : "array", + "items" : [ { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchMethod", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "SerializedData", + "namespace" : "io.infinitic.data", + "fields" : [ { + "name" : "bytes", + "type" : "bytes" + }, { + "name" : "type", + "type" : { + "type" : "enum", + "name" : "SerializedDataType", + "symbols" : [ "NULL", "JSON_JACKSON", "JSON_KOTLIN" ] + } + }, { + "name" : "meta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ { + "type" : "record", + "name" : "Canceled", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "canceledDeferredError", + "type" : [ { + "type" : "record", + "name" : "CanceledTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "CanceledWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "cancellationWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Completed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "returnIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "returnValue", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "completionWorkflowTaskIndex", + "type" : "int" + }, { + "name" : "signalId", + "type" : [ "null", "string" ], + "default" : null + } ] + }, { + "type" : "record", + "name" : "Failed", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "failedDeferredError", + "type" : [ { + "type" : "record", + "name" : "FailedTaskError", + "namespace" : "", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "cause", + "type" : { + "type" : "record", + "name" : "WorkerError", + "namespace" : "io.infinitic.tasks.executor", + "fields" : [ { + "name" : "workerName", + "type" : "string" + }, { + "name" : "name", + "type" : "string" + }, { + "name" : "message", + "type" : [ "null", "string" ] + }, { + "name" : "stackTraceToString", + "type" : "string" + }, { + "name" : "cause", + "type" : [ "null", "WorkerError" ] + } ] + } + } ] + }, { + "type" : "record", + "name" : "FailedWorkflowError", + "namespace" : "", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + }, { + "name" : "deferredError", + "type" : [ "CanceledTaskError", "CanceledWorkflowError", "FailedTaskError", "FailedWorkflowError", { + "type" : "record", + "name" : "FailedWorkflowTaskError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "workflowTaskId", + "type" : "string" + }, { + "name" : "cause", + "type" : "io.infinitic.tasks.executor.WorkerError" + } ] + }, { + "type" : "record", + "name" : "TimedOutTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "TimedOutWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + }, { + "type" : "record", + "name" : "UnknownTaskError", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "taskId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "UnknownWorkflowError", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : "string" + }, { + "name" : "methodRunId", + "type" : [ "null", "string" ] + } ] + } ] + } ] + }, "FailedWorkflowTaskError" ] + }, { + "name" : "failureWorkflowTaskIndex", + "type" : "int" + } ] + }, { + "type" : "record", + "name" : "Ongoing", + "namespace" : "CommandStatus", + "fields" : [ ] + }, { + "type" : "record", + "name" : "Unknown", + "namespace" : "CommandStatus", + "fields" : [ { + "name" : "unknownDeferredError", + "type" : [ "UnknownTaskError", "UnknownWorkflowError" ] + }, { + "name" : "unknowingWorkflowTaskIndex", + "type" : "int" + } ] + } ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchTask", + "namespace" : "Command", + "fields" : [ { + "name" : "taskName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "taskTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "taskMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "taskRetrySequence", + "type" : "int" + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "DispatchWorkflow", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "methodName", + "type" : "string" + }, { + "name" : "methodParameterTypes", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "methodParameters", + "type" : { + "type" : "array", + "items" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "workflowTags", + "type" : { + "type" : "array", + "items" : "string" + } + }, { + "name" : "workflowMeta", + "type" : { + "type" : "map", + "values" : "bytes" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "InlineTask", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "InlineTask", + "namespace" : "Command", + "fields" : [ { + "name" : "task", + "type" : "string" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "ReceiveSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignalType", + "type" : [ "null", "string" ] + }, { + "name" : "channelEventFilter", + "type" : [ "null", { + "type" : "record", + "name" : "ChannelEventFilter", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "jsonPath", + "type" : "string" + }, { + "name" : "filter", + "type" : [ "null", "string" ] + } ] + } ] + }, { + "name" : "receivedSignalLimit", + "type" : [ "int", "null" ], + "default" : 1 + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + }, { + "name" : "commandStatuses", + "type" : { + "type" : "array", + "items" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, + "default" : [ ] + } ] + }, { + "type" : "record", + "name" : "SendSignal", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "SendSignal", + "namespace" : "Command", + "fields" : [ { + "name" : "workflowName", + "type" : "string" + }, { + "name" : "workflowId", + "type" : [ "null", "string" ] + }, { + "name" : "workflowTag", + "type" : [ "null", "string" ] + }, { + "name" : "channelName", + "type" : "string" + }, { + "name" : "channelSignal", + "type" : "io.infinitic.data.SerializedData" + }, { + "name" : "channelSignalTypes", + "type" : { + "type" : "array", + "items" : "string" + } + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartDurationTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "duration", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + }, { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "PastCommand", + "fields" : [ { + "name" : "command", + "type" : { + "type" : "record", + "name" : "StartInstantTimer", + "namespace" : "Command", + "fields" : [ { + "name" : "instant", + "type" : "long" + } ] + } + }, { + "name" : "commandPosition", + "type" : "int" + }, { + "name" : "commandSimpleName", + "type" : "string" + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + }, { + "name" : "commandId", + "type" : "string" + } ] + } ] + } + }, { + "name" : "newStep", + "type" : [ "null", { + "type" : "record", + "name" : "NewStep", + "namespace" : "io.infinitic.workflows.data", + "fields" : [ { + "name" : "stepId", + "type" : "string" + }, { + "name" : "step", + "type" : [ { + "type" : "record", + "name" : "And", + "namespace" : "Step", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", { + "type" : "record", + "name" : "Id", + "fields" : [ { + "name" : "commandId", + "type" : "string" + }, { + "name" : "awaitIndex", + "type" : "int", + "default" : 0 + }, { + "name" : "commandStatus", + "type" : [ "CommandStatus.Canceled", "CommandStatus.Completed", "CommandStatus.Failed", "CommandStatus.Ongoing", "CommandStatus.Unknown" ] + } ] + }, { + "type" : "record", + "name" : "Or", + "fields" : [ { + "name" : "steps", + "type" : { + "type" : "array", + "items" : [ "And", "Id", "Or" ] + } + } ] + } ] + } + } ] + }, "Step.Id", "Step.Or" ] + }, { + "name" : "stepPosition", + "type" : "int" + } ] + } ] + }, { + "name" : "properties", + "type" : { + "type" : "map", + "values" : "io.infinitic.data.SerializedData" + } + }, { + "name" : "methodReturnValue", + "type" : [ "null", "io.infinitic.data.SerializedData" ] + }, { + "name" : "workflowVersion", + "type" : "int", + "default" : 0 + } ] +} \ No newline at end of file diff --git a/infinitic-common/src/main/resources/version b/infinitic-common/src/main/resources/version index 13ca94b17..12edb292a 100644 --- a/infinitic-common/src/main/resources/version +++ b/infinitic-common/src/main/resources/version @@ -1 +1 @@ -0.11.6 \ No newline at end of file +0.11.7 \ No newline at end of file diff --git a/infinitic-common/src/main/resources/versions b/infinitic-common/src/main/resources/versions index cbd5e9617..feaf5dfde 100644 --- a/infinitic-common/src/main/resources/versions +++ b/infinitic-common/src/main/resources/versions @@ -20,3 +20,4 @@ 0.11.4 0.11.5 0.11.6 +0.11.7 diff --git a/infinitic-common/src/test/kotlin/io/infinitic/common/tasks/DataTests.kt b/infinitic-common/src/test/kotlin/io/infinitic/common/tasks/DataTests.kt index 98fd28e94..d1b7c64b0 100644 --- a/infinitic-common/src/test/kotlin/io/infinitic/common/tasks/DataTests.kt +++ b/infinitic-common/src/test/kotlin/io/infinitic/common/tasks/DataTests.kt @@ -38,7 +38,6 @@ import io.infinitic.common.tasks.data.TaskRetrySequence import io.infinitic.common.tasks.data.TaskTag import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.shouldBe -import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/infinitic-common/src/test/kotlin/io/infinitic/common/workflows/DataTests.kt b/infinitic-common/src/test/kotlin/io/infinitic/common/workflows/DataTests.kt index 160700d0b..6703eaf7b 100644 --- a/infinitic-common/src/test/kotlin/io/infinitic/common/workflows/DataTests.kt +++ b/infinitic-common/src/test/kotlin/io/infinitic/common/workflows/DataTests.kt @@ -48,7 +48,6 @@ import io.infinitic.common.workflows.data.workflows.WorkflowTag import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.shouldBe import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/infinitic-common/src/test/kotlin/io/infinitic/workflows/DataTests.kt b/infinitic-common/src/test/kotlin/io/infinitic/workflows/DataTests.kt index 147238552..be388b778 100644 --- a/infinitic-common/src/test/kotlin/io/infinitic/workflows/DataTests.kt +++ b/infinitic-common/src/test/kotlin/io/infinitic/workflows/DataTests.kt @@ -28,7 +28,6 @@ import io.infinitic.common.workflows.data.steps.Step import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.shouldBe import io.mockk.mockk -import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/TaskA.kt b/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/TaskA.kt index 02e6ad9a4..a01edcf79 100644 --- a/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/TaskA.kt +++ b/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/TaskA.kt @@ -28,6 +28,8 @@ interface ParentInterface { interface TaskA : ParentInterface { fun concat(str1: String, str2: String): String + fun reverse(str: String): String + fun await(delay: Long): Long } diff --git a/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/WorkflowA.kt b/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/WorkflowA.kt index e21b131af..d850d0b87 100644 --- a/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/WorkflowA.kt +++ b/infinitic-common/src/test/kotlin/io/infinitic/workflows/samples/WorkflowA.kt @@ -38,10 +38,15 @@ interface WorkflowA { val channelString: SendChannel fun empty(): String + fun syncTask(duration: Long): Long + fun asyncTask(duration: Long): Deferred + fun syncWorkflow(duration: Long): Long + fun asyncWorkflow(duration: Long): Deferred + fun dispatchSelf(): Deferred } @@ -59,9 +64,13 @@ class WorkflowAImpl : Workflow(), WorkflowA { meta = mapOf("foo" to "bar".toByteArray())) override fun empty() = "void" + override fun syncTask(duration: Long) = taskA.await(duration) + override fun asyncTask(duration: Long) = dispatch(taskA::await, duration) + override fun syncWorkflow(duration: Long) = workflowA.syncTask(duration) + override fun asyncWorkflow(duration: Long) = dispatch(workflowA::syncTask, duration) override fun dispatchSelf(): Deferred = dispatch(self::empty) diff --git a/infinitic-dashboard/README.md b/infinitic-dashboard/README.md index 5d7749dad..80d725d90 100644 --- a/infinitic-dashboard/README.md +++ b/infinitic-dashboard/README.md @@ -1,4 +1,3 @@ - ``` npm i ``` diff --git a/infinitic-dashboard/build.gradle.kts b/infinitic-dashboard/build.gradle.kts index 9aa6aba15..fae1d6aee 100644 --- a/infinitic-dashboard/build.gradle.kts +++ b/infinitic-dashboard/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,24 +20,17 @@ * * Licensor: infinitic.io */ +repositories { maven("https://jitpack.io") } -repositories { - maven("https://jitpack.io") -} - -plugins { - application -} +plugins { application } -application { - mainClass.set("io.infinitic.dashboard.MainKt") -} +application { mainClass.set("io.infinitic.dashboard.MainKt") } dependencies { - implementation(Libs.Kweb.core) + implementation(Libs.Kweb.core) - implementation(project(":infinitic-pulsar")) - implementation(project(":infinitic-transport")) + implementation(project(":infinitic-pulsar")) + implementation(project(":infinitic-transport")) } apply("../publish.gradle.kts") diff --git a/infinitic-dashboard/postcss.config.js b/infinitic-dashboard/postcss.config.js index 6eab3833f..8a5cbc20d 100644 --- a/infinitic-dashboard/postcss.config.js +++ b/infinitic-dashboard/postcss.config.js @@ -23,9 +23,9 @@ * Licensor: infinitic.io */ - module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - } +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + } } diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsPanel.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsPanel.kt index d711a7eef..51aee7f35 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsPanel.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsPanel.kt @@ -34,9 +34,6 @@ import io.infinitic.dashboard.panels.infrastructure.task.TaskPanel import io.infinitic.dashboard.panels.infrastructure.workflow.WorkflowPanel import io.infinitic.dashboard.routeTo import io.infinitic.dashboard.slideovers.Slideover -import java.text.SimpleDateFormat -import java.time.Instant -import java.util.Date import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -57,6 +54,9 @@ import kweb.th import kweb.thead import kweb.tr import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.text.SimpleDateFormat +import java.time.Instant +import java.util.* object AllJobsPanel : Panel() { override val menu = InfraMenu diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsState.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsState.kt index e8156cdb5..51bf35415 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsState.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllJobsState.kt @@ -26,7 +26,6 @@ import io.infinitic.dashboard.panels.infrastructure.requests.Completed import io.infinitic.dashboard.panels.infrastructure.requests.Failed import io.infinitic.dashboard.panels.infrastructure.requests.Loading import io.infinitic.dashboard.panels.infrastructure.requests.Request -import java.time.Instant import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.isActive @@ -34,6 +33,7 @@ import kotlinx.coroutines.launch import kweb.state.KVar import mu.KotlinLogging import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.time.Instant private val logger = KotlinLogging.logger {} @@ -68,11 +68,13 @@ abstract class AllJobsState( } fun namesLoading() = create(names = names.copyLoading()) + fun statsLoading() = create(stats = stats.mapValues { it.value.copyLoading() }) abstract fun create(names: JobNames = this.names, stats: JobStats = this.stats): AllJobsState abstract fun getNames(): Set + abstract fun getPartitionedStats(name: String): PartitionedTopicStats } diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllTasksState.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllTasksState.kt index 87f0d951c..9a062b922 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllTasksState.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllTasksState.kt @@ -26,8 +26,8 @@ import io.infinitic.common.tasks.data.ServiceName import io.infinitic.dashboard.Infinitic import io.infinitic.dashboard.panels.infrastructure.requests.Loading import io.infinitic.transport.pulsar.topics.ServiceTopics -import java.time.Instant import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.time.Instant data class AllTasksState( override val names: JobNames = Loading(), diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllWorkflowsState.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllWorkflowsState.kt index f8785991b..20543f0e9 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllWorkflowsState.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/AllWorkflowsState.kt @@ -26,8 +26,8 @@ import io.infinitic.common.workflows.data.workflows.WorkflowName import io.infinitic.dashboard.Infinitic import io.infinitic.dashboard.panels.infrastructure.requests.Loading import io.infinitic.transport.pulsar.topics.WorkflowTaskTopics -import java.time.Instant import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.time.Instant data class AllWorkflowsState( override val names: JobNames = Loading(), diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/JobState.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/JobState.kt index 750fa9588..905c99074 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/JobState.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/JobState.kt @@ -27,7 +27,6 @@ import io.infinitic.dashboard.panels.infrastructure.requests.Completed import io.infinitic.dashboard.panels.infrastructure.requests.Failed import io.infinitic.dashboard.panels.infrastructure.requests.Request import io.infinitic.transport.pulsar.topics.TopicType -import java.time.Instant import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.isActive @@ -35,6 +34,7 @@ import kotlinx.coroutines.launch import kweb.state.KVar import mu.KotlinLogging import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.time.Instant private const val UPDATE_DELAY = 5000L @@ -50,6 +50,7 @@ abstract class JobState( companion object { fun isLoading(topicsStats: TopicsStats): Boolean = topicsStats.any { it.value.isLoading } + fun lastUpdatedAt(topicsStats: TopicsStats): Instant = topicsStats.maxOfOrNull { it.value.lastUpdated } ?: Instant.now() } diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/displayJobSectionHeader.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/displayJobSectionHeader.kt index 969c30b18..3c120ddd1 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/displayJobSectionHeader.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/jobs/displayJobSectionHeader.kt @@ -24,7 +24,6 @@ package io.infinitic.dashboard.panels.infrastructure.jobs import io.infinitic.dashboard.panels.infrastructure.lastUpdated import io.infinitic.dashboard.svgs.icons.iconRefresh -import java.time.Instant import kweb.Element import kweb.ElementCreator import kweb.div @@ -32,6 +31,7 @@ import kweb.h3 import kweb.new import kweb.span import kweb.state.KVar +import java.time.Instant internal fun ElementCreator.displayJobSectionHeader( title: String, diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/requests/Request.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/requests/Request.kt index 77e7aead1..c2e4ec632 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/requests/Request.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/requests/Request.kt @@ -22,17 +22,19 @@ */ package io.infinitic.dashboard.panels.infrastructure.requests -import java.time.Instant import org.apache.pulsar.client.admin.PulsarAdminException +import java.time.Instant sealed class Request { abstract val isLoading: Boolean abstract val lastUpdated: Instant + abstract fun copyLoading(): Request } data class Loading(override val lastUpdated: Instant = Instant.now()) : Request() { override val isLoading = true + override fun copyLoading() = copy() } diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/task/TaskPanel.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/task/TaskPanel.kt index 8258edc28..dd702972d 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/task/TaskPanel.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/task/TaskPanel.kt @@ -35,7 +35,6 @@ import io.infinitic.dashboard.panels.infrastructure.requests.Request import io.infinitic.dashboard.svgs.icons.iconChevron import io.infinitic.transport.pulsar.topics.ServiceTopics import io.infinitic.transport.pulsar.topics.TopicType -import java.util.concurrent.ConcurrentHashMap import kotlinx.coroutines.Job import kotlinx.coroutines.launch import kweb.Element @@ -52,6 +51,7 @@ import kweb.span import kweb.state.KVar import kweb.state.property import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.util.concurrent.ConcurrentHashMap class TaskPanel private constructor(private val taskName: String) : Panel() { diff --git a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/workflow/WorkflowPanel.kt b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/workflow/WorkflowPanel.kt index 50f2e8de2..6ac163736 100644 --- a/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/workflow/WorkflowPanel.kt +++ b/infinitic-dashboard/src/main/kotlin/io/infinitic/dashboard/panels/infrastructure/workflow/WorkflowPanel.kt @@ -37,8 +37,6 @@ import io.infinitic.dashboard.svgs.icons.iconChevron import io.infinitic.transport.pulsar.topics.TopicType import io.infinitic.transport.pulsar.topics.WorkflowTaskTopics import io.infinitic.transport.pulsar.topics.WorkflowTopics -import java.time.Instant -import java.util.concurrent.ConcurrentHashMap import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -56,6 +54,8 @@ import kweb.span import kweb.state.KVar import kweb.state.property import org.apache.pulsar.common.policies.data.PartitionedTopicStats +import java.time.Instant +import java.util.concurrent.ConcurrentHashMap class WorkflowPanel private constructor(private val workflowName: String) : Panel() { companion object { diff --git a/infinitic-dashboard/src/main/resources/css/compiled.css b/infinitic-dashboard/src/main/resources/css/compiled.css index 8bbf5a57c..ef5fb2ae8 100644 --- a/infinitic-dashboard/src/main/resources/css/compiled.css +++ b/infinitic-dashboard/src/main/resources/css/compiled.css @@ -34,15 +34,15 @@ *, ::before, ::after { - box-sizing: border-box; /* 1 */ - border-width: 0; /* 2 */ - border-style: solid; /* 2 */ - border-color: #e5e7eb; /* 2 */ + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #e5e7eb; /* 2 */ } ::before, ::after { - --tw-content: ''; + --tw-content: ''; } /* @@ -53,12 +53,12 @@ */ html { - line-height: 1.5; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -moz-tab-size: 4; /* 3 */ - -o-tab-size: 4; - tab-size: 4; /* 3 */ - font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -moz-tab-size: 4; /* 3 */ + -o-tab-size: 4; + tab-size: 4; /* 3 */ + font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ } /* @@ -67,8 +67,8 @@ html { */ body { - margin: 0; /* 1 */ - line-height: inherit; /* 2 */ + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ } /* @@ -78,9 +78,9 @@ body { */ hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ - border-top-width: 1px; /* 3 */ + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ } /* @@ -88,8 +88,8 @@ Add the correct text decoration in Chrome, Edge, and Safari. */ abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; } /* @@ -102,8 +102,8 @@ h3, h4, h5, h6 { - font-size: inherit; - font-weight: inherit; + font-size: inherit; + font-weight: inherit; } /* @@ -111,8 +111,8 @@ Reset links to optimize for opt-in styling instead of opt-out. */ a { - color: inherit; - text-decoration: inherit; + color: inherit; + text-decoration: inherit; } /* @@ -121,7 +121,7 @@ Add the correct font weight in Edge and Safari. b, strong { - font-weight: bolder; + font-weight: bolder; } /* @@ -133,8 +133,8 @@ code, kbd, samp, pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ - font-size: 1em; /* 2 */ + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ + font-size: 1em; /* 2 */ } /* @@ -142,7 +142,7 @@ Add the correct font size in all browsers. */ small { - font-size: 80%; + font-size: 80%; } /* @@ -151,18 +151,18 @@ Prevent `sub` and `sup` elements from affecting the line height in all browsers. sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sub { - bottom: -0.25em; + bottom: -0.25em; } sup { - top: -0.5em; + top: -0.5em; } /* @@ -172,9 +172,9 @@ sup { */ table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ - border-collapse: collapse; /* 3 */ + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ } /* @@ -188,13 +188,13 @@ input, optgroup, select, textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - font-weight: inherit; /* 1 */ - line-height: inherit; /* 1 */ - color: inherit; /* 1 */ - margin: 0; /* 2 */ - padding: 0; /* 3 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + font-weight: inherit; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ } /* @@ -203,7 +203,7 @@ Remove the inheritance of text transform in Edge and Firefox. button, select { - text-transform: none; + text-transform: none; } /* @@ -215,9 +215,9 @@ button, [type='button'], [type='reset'], [type='submit'] { - -webkit-appearance: button; /* 1 */ - background-color: transparent; /* 2 */ - background-image: none; /* 2 */ + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ } /* @@ -225,7 +225,7 @@ Use the modern Firefox focus style for all focusable elements. */ :-moz-focusring { - outline: auto; + outline: auto; } /* @@ -233,7 +233,7 @@ Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/ */ :-moz-ui-invalid { - box-shadow: none; + box-shadow: none; } /* @@ -241,7 +241,7 @@ Add the correct vertical alignment in Chrome and Firefox. */ progress { - vertical-align: baseline; + vertical-align: baseline; } /* @@ -250,7 +250,7 @@ Correct the cursor style of increment and decrement buttons in Safari. ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { - height: auto; + height: auto; } /* @@ -259,8 +259,8 @@ Correct the cursor style of increment and decrement buttons in Safari. */ [type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /* @@ -268,7 +268,7 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { - -webkit-appearance: none; + -webkit-appearance: none; } /* @@ -277,8 +277,8 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } /* @@ -286,7 +286,7 @@ Add the correct display in Chrome and Safari. */ summary { - display: list-item; + display: list-item; } /* @@ -306,24 +306,24 @@ hr, figure, p, pre { - margin: 0; + margin: 0; } fieldset { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } legend { - padding: 0; + padding: 0; } ol, ul, menu { - list-style: none; - margin: 0; - padding: 0; + list-style: none; + margin: 0; + padding: 0; } /* @@ -331,7 +331,7 @@ Prevent resizing textareas horizontally by default. */ textarea { - resize: vertical; + resize: vertical; } /* @@ -340,14 +340,14 @@ textarea { */ input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; /* 1 */ - color: #9ca3af; /* 2 */ + opacity: 1; /* 1 */ + color: #9ca3af; /* 2 */ } input::placeholder, textarea::placeholder { - opacity: 1; /* 1 */ - color: #9ca3af; /* 2 */ + opacity: 1; /* 1 */ + color: #9ca3af; /* 2 */ } /* @@ -356,7 +356,7 @@ Set the default cursor for buttons. button, [role="button"] { - cursor: pointer; + cursor: pointer; } /* @@ -364,7 +364,7 @@ Make sure disabled buttons don't get the pointer cursor. */ :disabled { - cursor: default; + cursor: default; } /* @@ -381,8 +381,8 @@ audio, iframe, embed, object { - display: block; /* 1 */ - vertical-align: middle; /* 2 */ + display: block; /* 1 */ + vertical-align: middle; /* 2 */ } /* @@ -391,990 +391,1188 @@ Constrain images and videos to the parent width and preserve their intrinsic asp img, video { - max-width: 100%; - height: auto; + max-width: 100%; + height: auto; } *, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } ::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } + .sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; } + .static { - position: static; + position: static; } + .fixed { - position: fixed; + position: fixed; } + .absolute { - position: absolute; + position: absolute; } + .relative { - position: relative; + position: relative; } + .inset-0 { - top: 0px; - right: 0px; - bottom: 0px; - left: 0px; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; } + .inset-y-0 { - top: 0px; - bottom: 0px; + top: 0px; + bottom: 0px; } + .top-0 { - top: 0px; + top: 0px; } + .right-0 { - right: 0px; + right: 0px; } + .z-40 { - z-index: 40; + z-index: 40; } + .z-0 { - z-index: 0; + z-index: 0; } + .z-10 { - z-index: 10; + z-index: 10; } + .mx-auto { - margin-left: auto; - margin-right: auto; + margin-left: auto; + margin-right: auto; } + .-my-2 { - margin-top: -0.5rem; - margin-bottom: -0.5rem; + margin-top: -0.5rem; + margin-bottom: -0.5rem; } + .mt-5 { - margin-top: 1.25rem; + margin-top: 1.25rem; } + .-ml-0\.5 { - margin-left: -0.125rem; + margin-left: -0.125rem; } + .-mt-0\.5 { - margin-top: -0.125rem; + margin-top: -0.125rem; } + .-ml-0 { - margin-left: -0px; + margin-left: -0px; } + .-mt-0 { - margin-top: -0px; + margin-top: -0px; } + .mt-2 { - margin-top: 0.5rem; + margin-top: 0.5rem; } + .mt-6 { - margin-top: 1.5rem; + margin-top: 1.5rem; } + .mr-4 { - margin-right: 1rem; + margin-right: 1rem; } + .mr-3 { - margin-right: 0.75rem; + margin-right: 0.75rem; } + .-mr-12 { - margin-right: -3rem; + margin-right: -3rem; } + .ml-1 { - margin-left: 0.25rem; + margin-left: 0.25rem; } + .mt-3 { - margin-top: 0.75rem; + margin-top: 0.75rem; } + .ml-3 { - margin-left: 0.75rem; + margin-left: 0.75rem; } + .mt-7 { - margin-top: 1.75rem; + margin-top: 1.75rem; } + .mr-1\.5 { - margin-right: 0.375rem; + margin-right: 0.375rem; } + .mr-1 { - margin-right: 0.25rem; + margin-right: 0.25rem; } + .inline-block { - display: inline-block; + display: inline-block; } + .flex { - display: flex; + display: flex; } + .inline-flex { - display: inline-flex; + display: inline-flex; } + .table { - display: table; + display: table; } + .contents { - display: contents; + display: contents; } + .hidden { - display: none; + display: none; } + .h-screen { - height: 100vh; + height: 100vh; } + .h-0 { - height: 0px; + height: 0px; } + .h-12 { - height: 3rem; + height: 3rem; } + .h-6 { - height: 1.5rem; + height: 1.5rem; } + .h-10 { - height: 2.5rem; + height: 2.5rem; } + .h-full { - height: 100%; + height: 100%; } + .h-7 { - height: 1.75rem; + height: 1.75rem; } + .h-96 { - height: 24rem; + height: 24rem; } + .h-44 { - height: 11rem; + height: 11rem; } + .h-5 { - height: 1.25rem; + height: 1.25rem; } + .min-h-screen { - min-height: 100vh; + min-height: 100vh; } + .w-full { - width: 100%; + width: 100%; } + .w-14 { - width: 3.5rem; + width: 3.5rem; } + .w-64 { - width: 16rem; + width: 16rem; } + .w-0 { - width: 0px; + width: 0px; } + .w-12 { - width: 3rem; + width: 3rem; } + .w-auto { - width: auto; + width: auto; } + .w-6 { - width: 1.5rem; + width: 1.5rem; } + .w-10 { - width: 2.5rem; + width: 2.5rem; } + .w-screen { - width: 100vw; + width: 100vw; } + .w-5 { - width: 1.25rem; + width: 1.25rem; } + .min-w-0 { - min-width: 0px; + min-width: 0px; } + .min-w-full { - min-width: 100%; + min-width: 100%; } + .max-w-xs { - max-width: 20rem; + max-width: 20rem; } + .max-w-7xl { - max-width: 80rem; + max-width: 80rem; } + .max-w-full { - max-width: 100%; + max-width: 100%; } + .max-w-3xl { - max-width: 48rem; + max-width: 48rem; } + .max-w-none { - max-width: none; + max-width: none; } + .flex-1 { - flex: 1 1 0%; + flex: 1 1 0%; } + .flex-shrink-0 { - flex-shrink: 0; + flex-shrink: 0; } + .shrink { - flex-shrink: 1; + flex-shrink: 1; } + .flex-grow { - flex-grow: 1; + flex-grow: 1; } + .translate-x-0 { - --tw-translate-x: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + .-translate-x-full { - --tw-translate-x: -100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + .translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + .translate-y-4 { - --tw-translate-y: 1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-translate-y: 1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + .translate-x-full { - --tw-translate-x: 100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + .transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } + @keyframes spin { - to { - transform: rotate(360deg); - } + to { + transform: rotate(360deg); + } } + .animate-spin { - animation: spin 1s linear infinite; + animation: spin 1s linear infinite; } + .cursor-pointer { - cursor: pointer; + cursor: pointer; } + .flex-col { - flex-direction: column; + flex-direction: column; } + .items-start { - align-items: flex-start; + align-items: flex-start; } + .items-end { - align-items: flex-end; + align-items: flex-end; } + .items-center { - align-items: center; + align-items: center; } + .justify-center { - justify-content: center; + justify-content: center; } + .justify-between { - justify-content: space-between; + justify-content: space-between; } + .space-y-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); } + .space-x-4 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(1rem * var(--tw-space-x-reverse)); - margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); } + .divide-y > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); + --tw-divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); } + .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-divide-opacity)); + --tw-divide-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-divide-opacity)); } + .overflow-hidden { - overflow: hidden; + overflow: hidden; } + .overflow-x-auto { - overflow-x: auto; + overflow-x: auto; } + .overflow-y-auto { - overflow-y: auto; + overflow-y: auto; } + .overflow-y-scroll { - overflow-y: scroll; + overflow-y: scroll; } + .rounded-md { - border-radius: 0.375rem; + border-radius: 0.375rem; } + .rounded-full { - border-radius: 9999px; + border-radius: 9999px; } + .rounded-lg { - border-radius: 0.5rem; + border-radius: 0.5rem; } + .border { - border-width: 1px; + border-width: 1px; } + .border-2 { - border-width: 2px; + border-width: 2px; } + .border-4 { - border-width: 4px; + border-width: 4px; } + .border-r { - border-right-width: 1px; + border-right-width: 1px; } + .border-b { - border-bottom-width: 1px; + border-bottom-width: 1px; } + .border-dashed { - border-style: dashed; + border-style: dashed; } + .border-gray-200 { - --tw-border-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-border-opacity)); + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); } + .border-transparent { - border-color: transparent; + border-color: transparent; } + .border-gray-300 { - --tw-border-opacity: 1; - border-color: rgb(209 213 219 / var(--tw-border-opacity)); + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); } + .bg-gray-100 { - --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); } + .bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } + .bg-gray-600 { - --tw-bg-opacity: 1; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } + .bg-gray-500 { - --tw-bg-opacity: 1; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); } + .bg-red-100 { - --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(254 226 226 / var(--tw-bg-opacity)); } + .bg-red-600 { - --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(220 38 38 / var(--tw-bg-opacity)); } + .bg-gray-50 { - --tw-bg-opacity: 1; - background-color: rgb(249 250 251 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); } + .bg-opacity-75 { - --tw-bg-opacity: 0.75; + --tw-bg-opacity: 0.75; } + .px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; } + .px-4 { - padding-left: 1rem; - padding-right: 1rem; + padding-left: 1rem; + padding-right: 1rem; } + .py-16 { - padding-top: 4rem; - padding-bottom: 4rem; + padding-top: 4rem; + padding-bottom: 4rem; } + .py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } + .py-6 { - padding-top: 1.5rem; - padding-bottom: 1.5rem; + padding-top: 1.5rem; + padding-bottom: 1.5rem; } + .py-8 { - padding-top: 2rem; - padding-bottom: 2rem; + padding-top: 2rem; + padding-bottom: 2rem; } + .px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; + padding-left: 1.5rem; + padding-right: 1.5rem; } + .py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; } + .py-4 { - padding-top: 1rem; - padding-bottom: 1rem; + padding-top: 1rem; + padding-bottom: 1rem; } + .pt-5 { - padding-top: 1.25rem; + padding-top: 1.25rem; } + .pb-4 { - padding-bottom: 1rem; + padding-bottom: 1rem; } + .pl-1 { - padding-left: 0.25rem; + padding-left: 0.25rem; } + .pt-1 { - padding-top: 0.25rem; + padding-top: 0.25rem; } + .pt-16 { - padding-top: 4rem; + padding-top: 4rem; } + .pb-12 { - padding-bottom: 3rem; + padding-bottom: 3rem; } + .pt-2 { - padding-top: 0.5rem; + padding-top: 0.5rem; } + .pt-4 { - padding-top: 1rem; + padding-top: 1rem; } + .pb-20 { - padding-bottom: 5rem; + padding-bottom: 5rem; } + .pr-4 { - padding-right: 1rem; + padding-right: 1rem; } + .pl-10 { - padding-left: 2.5rem; + padding-left: 2.5rem; } + .pt-12 { - padding-top: 3rem; + padding-top: 3rem; } + .pt-0 { - padding-top: 0px; + padding-top: 0px; } + .pt-8 { - padding-top: 2rem; + padding-top: 2rem; } + .pb-8 { - padding-bottom: 2rem; + padding-bottom: 2rem; } + .pb-5 { - padding-bottom: 1.25rem; + padding-bottom: 1.25rem; } + .text-left { - text-align: left; + text-align: left; } + .text-center { - text-align: center; + text-align: center; } + .align-middle { - vertical-align: middle; + vertical-align: middle; } + .align-bottom { - vertical-align: bottom; + vertical-align: bottom; } + .text-sm { - font-size: 0.875rem; - line-height: 1.25rem; + font-size: 0.875rem; + line-height: 1.25rem; } + .text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; + font-size: 2.25rem; + line-height: 2.5rem; } + .text-base { - font-size: 1rem; - line-height: 1.5rem; + font-size: 1rem; + line-height: 1.5rem; } + .text-lg { - font-size: 1.125rem; - line-height: 1.75rem; + font-size: 1.125rem; + line-height: 1.75rem; } + .text-2xl { - font-size: 1.5rem; - line-height: 2rem; + font-size: 1.5rem; + line-height: 2rem; } + .text-xs { - font-size: 0.75rem; - line-height: 1rem; + font-size: 0.75rem; + line-height: 1rem; } + .font-semibold { - font-weight: 600; + font-weight: 600; } + .font-extrabold { - font-weight: 800; + font-weight: 800; } + .font-medium { - font-weight: 500; + font-weight: 500; } + .font-bold { - font-weight: 700; + font-weight: 700; } + .uppercase { - text-transform: uppercase; + text-transform: uppercase; } + .italic { - font-style: italic; + font-style: italic; } + .leading-6 { - line-height: 1.5rem; + line-height: 1.5rem; } + .leading-7 { - line-height: 1.75rem; + line-height: 1.75rem; } + .tracking-wide { - letter-spacing: 0.025em; + letter-spacing: 0.025em; } + .tracking-tight { - letter-spacing: -0.025em; + letter-spacing: -0.025em; } + .tracking-wider { - letter-spacing: 0.05em; + letter-spacing: 0.05em; } + .text-gray-500 { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); } + .text-indigo-600 { - --tw-text-opacity: 1; - color: rgb(79 70 229 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(79 70 229 / var(--tw-text-opacity)); } + .text-gray-900 { - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); } + .text-gray-600 { - --tw-text-opacity: 1; - color: rgb(75 85 99 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); } + .text-gray-400 { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); } + .text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); } + .text-red-600 { - --tw-text-opacity: 1; - color: rgb(220 38 38 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(220 38 38 / var(--tw-text-opacity)); } + .text-gray-700 { - --tw-text-opacity: 1; - color: rgb(55 65 81 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); } + .underline { - text-decoration-line: underline; + text-decoration-line: underline; } + .opacity-100 { - opacity: 1; + opacity: 1; } + .opacity-0 { - opacity: 0; + opacity: 0; } + .shadow-xl { - --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } + .shadow-sm { - --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } + .shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } + .transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; } + .transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; } + .transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; } + .duration-300 { - transition-duration: 300ms; + transition-duration: 300ms; } + .duration-200 { - transition-duration: 200ms; + transition-duration: 200ms; } + .duration-500 { - transition-duration: 500ms; + transition-duration: 500ms; } + .ease-in-out { - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } + .ease-linear { - transition-timing-function: linear; + transition-timing-function: linear; } + .ease-out { - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } + .ease-in { - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); } + .hover\:bg-gray-50:hover { - --tw-bg-opacity: 1; - background-color: rgb(249 250 251 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); } + .hover\:bg-red-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(185 28 28 / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(185 28 28 / var(--tw-bg-opacity)); } + .hover\:text-gray-900:hover { - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); } + .hover\:text-indigo-500:hover { - --tw-text-opacity: 1; - color: rgb(99 102 241 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(99 102 241 / var(--tw-text-opacity)); } + .hover\:text-gray-500:hover { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); } + .hover\:text-gray-700:hover { - --tw-text-opacity: 1; - color: rgb(55 65 81 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); } + .focus\:outline-none:focus { - outline: 2px solid transparent; - outline-offset: 2px; + outline: 2px solid transparent; + outline-offset: 2px; } + .focus\:ring-2:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } + .focus\:ring-inset:focus { - --tw-ring-inset: inset; + --tw-ring-inset: inset; } + .focus\:ring-indigo-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); + --tw-ring-opacity: 1; + --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); } + .focus\:ring-white:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); } + .focus\:ring-red-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); + --tw-ring-opacity: 1; + --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); } + .focus\:ring-offset-2:focus { - --tw-ring-offset-width: 2px; + --tw-ring-offset-width: 2px; } + .group:hover .group-hover\:text-gray-500 { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); } -@media (min-width: 640px) { - - .sm\:my-8 { - margin-top: 2rem; - margin-bottom: 2rem; - } - - .sm\:mx-0 { - margin-left: 0px; - margin-right: 0px; - } - - .sm\:-mx-6 { - margin-left: -1.5rem; - margin-right: -1.5rem; - } - - .sm\:mt-0 { - margin-top: 0px; - } - - .sm\:ml-4 { - margin-left: 1rem; - } - - .sm\:mt-4 { - margin-top: 1rem; - } - - .sm\:ml-3 { - margin-left: 0.75rem; - } - - .sm\:block { - display: block; - } - - .sm\:inline-block { - display: inline-block; - } - - .sm\:flex { - display: flex; - } - - .sm\:h-screen { - height: 100vh; - } - - .sm\:h-10 { - height: 2.5rem; - } - - .sm\:w-full { - width: 100%; - } - - .sm\:w-10 { - width: 2.5rem; - } - - .sm\:w-auto { - width: auto; - } - - .sm\:max-w-lg { - max-width: 32rem; - } - - .sm\:translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:scale-100 { - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:scale-95 { - --tw-scale-x: .95; - --tw-scale-y: .95; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:flex-row-reverse { - flex-direction: row-reverse; - } - - .sm\:items-start { - align-items: flex-start; - } - - .sm\:items-center { - align-items: center; - } - - .sm\:justify-between { - justify-content: space-between; - } - - .sm\:truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .sm\:rounded-lg { - border-radius: 0.5rem; - } - - .sm\:p-0 { - padding: 0px; - } - - .sm\:p-6 { - padding: 1.5rem; - } - .sm\:px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - .sm\:pl-3 { - padding-left: 0.75rem; - } - - .sm\:pt-3 { - padding-top: 0.75rem; - } - - .sm\:pl-16 { - padding-left: 4rem; - } - - .sm\:text-left { - text-align: left; - } - - .sm\:align-middle { - vertical-align: middle; - } - - .sm\:text-5xl { - font-size: 3rem; - line-height: 1; - } - - .sm\:text-sm { - font-size: 0.875rem; - line-height: 1.25rem; - } - - .sm\:text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; - } - - .sm\:shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); - } +@media (min-width: 640px) { - .sm\:duration-700 { - transition-duration: 700ms; - } + .sm\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .sm\:mx-0 { + margin-left: 0px; + margin-right: 0px; + } + + .sm\:-mx-6 { + margin-left: -1.5rem; + margin-right: -1.5rem; + } + + .sm\:mt-0 { + margin-top: 0px; + } + + .sm\:ml-4 { + margin-left: 1rem; + } + + .sm\:mt-4 { + margin-top: 1rem; + } + + .sm\:ml-3 { + margin-left: 0.75rem; + } + + .sm\:block { + display: block; + } + + .sm\:inline-block { + display: inline-block; + } + + .sm\:flex { + display: flex; + } + + .sm\:h-screen { + height: 100vh; + } + + .sm\:h-10 { + height: 2.5rem; + } + + .sm\:w-full { + width: 100%; + } + + .sm\:w-10 { + width: 2.5rem; + } + + .sm\:w-auto { + width: auto; + } + + .sm\:max-w-lg { + max-width: 32rem; + } + + .sm\:translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + + .sm\:scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + + .sm\:scale-95 { + --tw-scale-x: .95; + --tw-scale-y: .95; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + + .sm\:flex-row-reverse { + flex-direction: row-reverse; + } + + .sm\:items-start { + align-items: flex-start; + } + + .sm\:items-center { + align-items: center; + } + + .sm\:justify-between { + justify-content: space-between; + } + + .sm\:truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .sm\:rounded-lg { + border-radius: 0.5rem; + } + + .sm\:p-0 { + padding: 0px; + } + + .sm\:p-6 { + padding: 1.5rem; + } + + .sm\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .sm\:pl-3 { + padding-left: 0.75rem; + } + + .sm\:pt-3 { + padding-top: 0.75rem; + } + + .sm\:pl-16 { + padding-left: 4rem; + } + + .sm\:text-left { + text-align: left; + } + + .sm\:align-middle { + vertical-align: middle; + } + + .sm\:text-5xl { + font-size: 3rem; + line-height: 1; + } + + .sm\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .sm\:text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; + } + + .sm\:shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + } + + .sm\:duration-700 { + transition-duration: 700ms; + } } + @media (min-width: 768px) { - .md\:flex { - display: flex; - } + .md\:flex { + display: flex; + } - .md\:hidden { - display: none; - } + .md\:hidden { + display: none; + } - .md\:flex-shrink-0 { - flex-shrink: 0; - } + .md\:flex-shrink-0 { + flex-shrink: 0; + } - .md\:px-8 { - padding-left: 2rem; - padding-right: 2rem; - } + .md\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } - .md\:pt-0 { - padding-top: 0px; - } + .md\:pt-0 { + padding-top: 0px; + } } + @media (min-width: 1024px) { - .lg\:-mx-8 { - margin-left: -2rem; - margin-right: -2rem; - } + .lg\:-mx-8 { + margin-left: -2rem; + margin-right: -2rem; + } - .lg\:flex { - display: flex; - } + .lg\:flex { + display: flex; + } - .lg\:items-center { - align-items: center; - } + .lg\:items-center { + align-items: center; + } - .lg\:justify-between { - justify-content: space-between; - } + .lg\:justify-between { + justify-content: space-between; + } - .lg\:px-8 { - padding-left: 2rem; - padding-right: 2rem; - } + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } } diff --git a/infinitic-dashboard/src/main/resources/simplelogger.properties b/infinitic-dashboard/src/main/resources/simplelogger.properties index f929148ae..217cdad2a 100644 --- a/infinitic-dashboard/src/main/resources/simplelogger.properties +++ b/infinitic-dashboard/src/main/resources/simplelogger.properties @@ -1,38 +1,29 @@ # SLF4J's SimpleLogger configuration file # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. - # Log file #org.slf4j.simpleLogger.logFile=infinitic.log - - # Default logging detail level for all instances of SimpleLogger. # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, defaults to "info". org.slf4j.simpleLogger.defaultLogLevel=warn - # Logging detail level for a SimpleLogger instance named "xxxxx". # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, the default logging detail level is used. #org.slf4j.simpleLogger.log.io.infinitic.services.engine.TaskEngine=debug - # Set to true if you want the current date and time to be included in output messages. # Default is false, and will output the number of milliseconds elapsed since startup. org.slf4j.simpleLogger.showDateTime=true - # The date and time format to be used in the output messages. # The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. # If the format is not specified or is invalid, the default format is used. # The default format is yyyy-MM-dd HH:mm:ss:SSS Z. org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z - # Set to true if you want to output the current thread name. # Defaults to true. org.slf4j.simpleLogger.showThreadName=false - # Set to true if you want the Logger instance name to be included in output messages. # Defaults to true. # org.slf4j.simpleLogger.showLogName=true - # Set to true if you want the last component of the name to be included in output messages. # Defaults to false. org.slf4j.simpleLogger.showShortLogName=true diff --git a/infinitic-dashboard/tailwind.config.js b/infinitic-dashboard/tailwind.config.js index 90e519d68..82aa6aacd 100644 --- a/infinitic-dashboard/tailwind.config.js +++ b/infinitic-dashboard/tailwind.config.js @@ -26,14 +26,14 @@ const defaultTheme = require('tailwindcss/defaultTheme') module.exports = { - content: [ - './src/**/*.kt' - ], - theme: { - extend: { - fontFamily: { - sans: ['Inter var', ...defaultTheme.fontFamily.sans], + content: [ + './src/**/*.kt' + ], + theme: { + extend: { + fontFamily: { + sans: ['Inter var', ...defaultTheme.fontFamily.sans], + }, }, - }, - } + } } diff --git a/infinitic-inMemory/build.gradle.kts b/infinitic-inMemory/build.gradle.kts index 4254e7833..7aa2cc3a7 100644 --- a/infinitic-inMemory/build.gradle.kts +++ b/infinitic-inMemory/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,21 +20,20 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Coroutines.core) - implementation(Libs.Coroutines.jdk8) + implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.jdk8) - api(project(":infinitic-common")) - api(project(":infinitic-transport")) - api(project(":infinitic-transport-inmemory")) - api(project(":infinitic-client-base")) - api(project(":infinitic-storage")) - implementation(project(":infinitic-cache")) - implementation(project(":infinitic-workflow-tag")) - implementation(project(":infinitic-workflow-engine")) - implementation(project(":infinitic-task-executor")) - implementation(project(":infinitic-worker-base")) + api(project(":infinitic-common")) + api(project(":infinitic-transport")) + api(project(":infinitic-transport-inmemory")) + api(project(":infinitic-client-base")) + api(project(":infinitic-storage")) + implementation(project(":infinitic-cache")) + implementation(project(":infinitic-workflow-tag")) + implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-task-executor")) + implementation(project(":infinitic-worker-base")) } apply("../publish.gradle.kts") diff --git a/infinitic-inMemory/src/test/resources/simplelogger.properties b/infinitic-inMemory/src/test/resources/simplelogger.properties index 6cab8950b..61abd000d 100644 --- a/infinitic-inMemory/src/test/resources/simplelogger.properties +++ b/infinitic-inMemory/src/test/resources/simplelogger.properties @@ -1,23 +1,17 @@ # SLF4J's SimpleLogger configuration file # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. - # Uncomment this line to use a log file #org.slf4j.simpleLogger.logFile=infinitic.log - # Default logging detail level for all instances of SimpleLogger. # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, defaults to "info". org.slf4j.simpleLogger.defaultLogLevel=info - # Set to true if you want the current date and time to be included in output messages. # Default is false, and will output the number of milliseconds elapsed since startup. org.slf4j.simpleLogger.showDateTime=true - # Set to true if you want to output the current thread name. # Defaults to true. org.slf4j.simpleLogger.showThreadName=false - - # Set to true if you want the last component of the name to be included in output messages. # Defaults to false. org.slf4j.simpleLogger.showShortLogName=true diff --git a/infinitic-pulsar/build.gradle.kts b/infinitic-pulsar/build.gradle.kts index de5fa733a..09fc9d7d7 100644 --- a/infinitic-pulsar/build.gradle.kts +++ b/infinitic-pulsar/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,32 +20,29 @@ * * Licensor: infinitic.io */ - -plugins { - `java-library` -} +plugins { `java-library` } dependencies { - implementation(Libs.Coroutines.core) - implementation(Libs.Coroutines.jdk8) - implementation(Libs.Pulsar.functions) - implementation(Libs.Hoplite.core) - implementation(Libs.Hoplite.yaml) + implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.jdk8) + implementation(Libs.Pulsar.functions) + implementation(Libs.Hoplite.core) + implementation(Libs.Hoplite.yaml) - api(Libs.Pulsar.client) - api(Libs.Pulsar.clientAdmin) - api(Libs.Pulsar.authAthenz) - api(Libs.Pulsar.authSasl) - api(project(":infinitic-common")) - api(project(":infinitic-client-base")) - api(project(":infinitic-worker-base")) - api(project(":infinitic-task-executor")) - api(project(":infinitic-transport")) + api(Libs.Pulsar.client) + api(Libs.Pulsar.clientAdmin) + api(Libs.Pulsar.authAthenz) + api(Libs.Pulsar.authSasl) + api(project(":infinitic-common")) + api(project(":infinitic-client-base")) + api(project(":infinitic-worker-base")) + api(project(":infinitic-task-executor")) + api(project(":infinitic-transport")) - implementation(project(":infinitic-workflow-tag")) - implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-workflow-tag")) + implementation(project(":infinitic-workflow-engine")) - testImplementation(Libs.Kotlin.reflect) + testImplementation(Libs.Kotlin.reflect) } apply("../publish.gradle.kts") diff --git a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticAdmin.kt b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticAdmin.kt index 474b4ccff..b7d52e7bf 100644 --- a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticAdmin.kt +++ b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticAdmin.kt @@ -30,7 +30,6 @@ import io.infinitic.transport.pulsar.topics.PerNameTopics import io.infinitic.transport.pulsar.topics.ServiceTopics import io.infinitic.transport.pulsar.topics.WorkflowTaskTopics import io.infinitic.transport.pulsar.topics.WorkflowTopics -import java.io.Closeable import mu.KotlinLogging import org.apache.pulsar.client.admin.Clusters import org.apache.pulsar.client.admin.Namespaces @@ -45,6 +44,7 @@ import org.apache.pulsar.common.policies.data.TenantInfo import org.apache.pulsar.common.policies.data.TopicType import org.apache.pulsar.common.policies.data.impl.AutoTopicCreationOverrideImpl import org.apache.pulsar.common.policies.data.impl.DelayedDeliveryPoliciesImpl +import java.io.Closeable @Suppress("unused", "MemberVisibilityCanBePrivate") class PulsarInfiniticAdmin constructor(val pulsarAdmin: PulsarAdmin, val pulsar: Pulsar) : @@ -75,7 +75,8 @@ class PulsarInfiniticAdmin constructor(val pulsarAdmin: PulsarAdmin, val pulsar: // retention policies retention_policies = RetentionPolicies( - pulsar.policies.retentionTimeInMinutes, pulsar.policies.retentionSizeInMB) + pulsar.policies.retentionTimeInMinutes, pulsar.policies.retentionSizeInMB.toLong() + ) message_ttl_in_seconds = pulsar.policies.messageTTLInSeconds delayed_delivery_policies = DelayedDeliveryPoliciesImpl(pulsar.policies.delayedDeliveryTickTimeMillis, true) diff --git a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticWorker.kt b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticWorker.kt index 27996b743..95a2b35b5 100644 --- a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticWorker.kt +++ b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/PulsarInfiniticWorker.kt @@ -32,8 +32,6 @@ import io.infinitic.transport.pulsar.topics.WorkflowTaskTopics import io.infinitic.transport.pulsar.topics.WorkflowTopics import io.infinitic.workers.WorkerAbstract import io.infinitic.workers.register.WorkerRegister -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executors import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.asCoroutineDispatcher @@ -46,6 +44,8 @@ import org.apache.pulsar.client.admin.Tenants import org.apache.pulsar.client.admin.TopicPolicies import org.apache.pulsar.client.admin.Topics import org.apache.pulsar.client.api.PulsarClient +import java.util.concurrent.CompletableFuture +import java.util.concurrent.Executors @Suppress("MemberVisibilityCanBePrivate", "unused") class PulsarInfiniticWorker( diff --git a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/getProducerName.kt b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/getProducerName.kt index ee4005876..c37d064f9 100644 --- a/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/getProducerName.kt +++ b/infinitic-pulsar/src/main/kotlin/io/infinitic/pulsar/getProducerName.kt @@ -24,9 +24,9 @@ package io.infinitic.pulsar import io.infinitic.transport.pulsar.topics.GlobalTopics import io.infinitic.transport.pulsar.topics.TopicNames -import kotlin.system.exitProcess import org.apache.pulsar.client.api.PulsarClient import org.apache.pulsar.client.api.PulsarClientException +import kotlin.system.exitProcess /** Useful to check the uniqueness of a connected producer's name or to provide a unique name */ internal fun getProducerName( diff --git a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/TaskA.kt b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/TaskA.kt index 429d9bf85..8324e7a30 100644 --- a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/TaskA.kt +++ b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/TaskA.kt @@ -27,12 +27,16 @@ import kotlinx.coroutines.runBlocking interface TaskA { fun concat(str1: String, str2: String): String + fun reverse(str: String): String + fun await(delay: Long) } class TaskAImpl : TaskA { override fun concat(str1: String, str2: String) = str1 + str2 + override fun reverse(str: String) = str.reversed() + override fun await(delay: Long) = runBlocking { delay(delay) } } diff --git a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowA.kt b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowA.kt index fc32b9d50..e9d65ab3d 100644 --- a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowA.kt +++ b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowA.kt @@ -30,26 +30,47 @@ import java.time.LocalDateTime interface WorkflowA { fun empty(): String + fun seq1(): String + fun seq2(): String + fun seq3(): String + fun seq4(): String + fun or1(): String + fun or2(): Any + fun or3(): String + fun and1(): List + fun and2(): List + fun and3(): List + fun inline(): String + fun inline2(): String + fun inline3(): String + fun child1(): String + fun child2(): String + fun prop1(): String + fun prop2(): String + fun prop3(): String + fun prop4(): String + fun prop5(): String + fun prop6(): String } diff --git a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowB.kt b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowB.kt index 19c9b3975..e4f0919f9 100644 --- a/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowB.kt +++ b/infinitic-pulsar/src/test/kotlin/io/infinitic/pulsar/samples/WorkflowB.kt @@ -26,6 +26,7 @@ import io.infinitic.workflows.Workflow interface WorkflowB { fun concat(input: String): String + fun factorial(n: Long): Long } diff --git a/infinitic-storage/build.gradle.kts b/infinitic-storage/build.gradle.kts index f2379f701..23f30133c 100644 --- a/infinitic-storage/build.gradle.kts +++ b/infinitic-storage/build.gradle.kts @@ -34,9 +34,9 @@ dependencies { // MySql // For connection pooling implementation("com.zaxxer:HikariCP:5.0.1") - implementation("mysql:mysql-connector-java:8.0.33") + implementation("com.mysql:mysql-connector-j:8.2.0") // For integration tests - testImplementation("org.testcontainers:mysql:1.18.3") + testImplementation("org.testcontainers:mysql:1.19.1") testImplementation(Libs.Hoplite.yaml) } diff --git a/infinitic-storage/src/main/kotlin/io/infinitic/storage/keySet/KeySetStorage.kt b/infinitic-storage/src/main/kotlin/io/infinitic/storage/keySet/KeySetStorage.kt index a6e03d2c2..7b7b84362 100644 --- a/infinitic-storage/src/main/kotlin/io/infinitic/storage/keySet/KeySetStorage.kt +++ b/infinitic-storage/src/main/kotlin/io/infinitic/storage/keySet/KeySetStorage.kt @@ -26,6 +26,8 @@ import io.infinitic.storage.Flushable interface KeySetStorage : Flushable { suspend fun get(key: String): Set + suspend fun add(key: String, value: ByteArray) + suspend fun remove(key: String, value: ByteArray) } diff --git a/infinitic-storage/src/main/kotlin/io/infinitic/storage/keyValue/KeyValueStorage.kt b/infinitic-storage/src/main/kotlin/io/infinitic/storage/keyValue/KeyValueStorage.kt index 86b6bdf68..6ebd93014 100644 --- a/infinitic-storage/src/main/kotlin/io/infinitic/storage/keyValue/KeyValueStorage.kt +++ b/infinitic-storage/src/main/kotlin/io/infinitic/storage/keyValue/KeyValueStorage.kt @@ -26,6 +26,8 @@ import io.infinitic.storage.Flushable interface KeyValueStorage : Flushable { suspend fun get(key: String): ByteArray? + suspend fun put(key: String, value: ByteArray) + suspend fun del(key: String) } diff --git a/infinitic-storage/src/test/kotlin/io/infinitic/storage/config/StorageTests.kt b/infinitic-storage/src/test/kotlin/io/infinitic/storage/config/StorageTests.kt index 2b2d34acd..cabe12e2b 100644 --- a/infinitic-storage/src/test/kotlin/io/infinitic/storage/config/StorageTests.kt +++ b/infinitic-storage/src/test/kotlin/io/infinitic/storage/config/StorageTests.kt @@ -91,44 +91,45 @@ class StorageTests : .pool shouldBe RedisKeyValueStorage.of(Redis()).pool } - "properties of MySQL".config(enabledIf = { DockerOnly.shouldRun }) { - val mysqlServer = - MySQLContainer("mysql:5.7") - .apply { - startupAttempts = 1 - withUsername("test") - withPassword("password") - withDatabaseName("infinitic") - } - .let { - it.start() - it - } - - val mysql = - MySQL( - host = mysqlServer.host, - port = mysqlServer.firstMappedPort, - user = mysqlServer.username, - password = Secret(mysqlServer.password), - database = mysqlServer.databaseName) - - val config = Storage(mysql = mysql, compression = null) - - config.type shouldBe "mysql" - - // config.keySet should be MySQLKeySetStorage(pool) - config.keySet::class shouldBe MySQLKeySetStorage::class - (config.keySet as MySQLKeySetStorage).pool shouldBe MySQLKeySetStorage.of(mysql).pool - - // config.keyValue should be CompressedKeyValueStorage(MySQLKeyValueStorage(pool)) - config.keyValue::class shouldBe CompressedKeyValueStorage::class - (config.keyValue as CompressedKeyValueStorage).storage::class shouldBe - MySQLKeyValueStorage::class - (((config.keyValue as CompressedKeyValueStorage)).storage as MySQLKeyValueStorage) - .pool shouldBe MySQLKeyValueStorage.of(mysql).pool - - mysql.close() - mysqlServer.close() - } + "properties of MySQL" + .config(enabledIf = { DockerOnly.shouldRun }) { + val mysqlServer = + MySQLContainer("mysql:5.7") + .apply { + startupAttempts = 1 + withUsername("test") + withPassword("password") + withDatabaseName("infinitic") + } + .let { + it.start() + it + } + + val mysql = + MySQL( + host = mysqlServer.host, + port = mysqlServer.firstMappedPort, + user = mysqlServer.username, + password = Secret(mysqlServer.password), + database = mysqlServer.databaseName) + + val config = Storage(mysql = mysql, compression = null) + + config.type shouldBe "mysql" + + // config.keySet should be MySQLKeySetStorage(pool) + config.keySet::class shouldBe MySQLKeySetStorage::class + (config.keySet as MySQLKeySetStorage).pool shouldBe MySQLKeySetStorage.of(mysql).pool + + // config.keyValue should be CompressedKeyValueStorage(MySQLKeyValueStorage(pool)) + config.keyValue::class shouldBe CompressedKeyValueStorage::class + (config.keyValue as CompressedKeyValueStorage).storage::class shouldBe + MySQLKeyValueStorage::class + (((config.keyValue as CompressedKeyValueStorage)).storage as MySQLKeyValueStorage) + .pool shouldBe MySQLKeyValueStorage.of(mysql).pool + + mysql.close() + mysqlServer.close() + } }) diff --git a/infinitic-task-executor/build.gradle.kts b/infinitic-task-executor/build.gradle.kts index 667698d0d..938b1f383 100644 --- a/infinitic-task-executor/build.gradle.kts +++ b/infinitic-task-executor/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,14 +20,13 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(kotlin("reflect")) - implementation(Libs.Coroutines.core) + implementation(kotlin("reflect")) + implementation(Libs.Coroutines.core) - implementation(project(":infinitic-client-base")) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-workflow-task")) + implementation(project(":infinitic-client-base")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-workflow-task")) } apply("../publish.gradle.kts") diff --git a/infinitic-task-executor/src/main/kotlin/io/infinitic/tasks/executor/TaskExecutor.kt b/infinitic-task-executor/src/main/kotlin/io/infinitic/tasks/executor/TaskExecutor.kt index 72b55b986..43d51149e 100644 --- a/infinitic-task-executor/src/main/kotlin/io/infinitic/tasks/executor/TaskExecutor.kt +++ b/infinitic-task-executor/src/main/kotlin/io/infinitic/tasks/executor/TaskExecutor.kt @@ -232,9 +232,9 @@ class TaskExecutor( } this.withTimeout = // use timeout from registry, if it exists - registered.withTimeout // else use withTimeout from method annotation - ?: workflowMethod.getAnnotation(Timeout::class.java)?.getInstance() + registered.withTimeout + ?: workflowMethod.getAnnotation(Timeout::class.java)?.getInstance() // else use withRetry from class annotation ?: workflow::class.java.getAnnotation(Timeout::class.java)?.getInstance() // else use workflow if WithTimeout @@ -246,9 +246,9 @@ class TaskExecutor( ?: DEFAULT_WORKFLOW_TASK_TIMEOUT this.withRetry = // use timeout from registry, if it exists - registered.withRetry // else use withTimeout from method annotation - ?: workflowMethod.getAnnotation(Retry::class.java)?.getInstance() + registered.withRetry + ?: workflowMethod.getAnnotation(Retry::class.java)?.getInstance() // else use withRetry from class annotation ?: workflow::class.java.getAnnotation(Retry::class.java)?.getInstance() // else use workflow if WithTimeout @@ -261,9 +261,9 @@ class TaskExecutor( val checkMode = // get checkMode from registry - registered.checkMode // else get mode from method annotation - ?: workflowMethod.getAnnotation(CheckMode::class.java)?.mode + registered.checkMode + ?: workflowMethod.getAnnotation(CheckMode::class.java)?.mode // else get mode from class annotation ?: workflow::class.java.getAnnotation(CheckMode::class.java)?.mode // else use default value @@ -280,9 +280,9 @@ class TaskExecutor( this.withTimeout = // use withTimeout from registry, if it exists - registered.withTimeout // else use withTimeout from method annotation - ?: taskMethod.getAnnotation(Timeout::class.java)?.getInstance() + registered.withTimeout + ?: taskMethod.getAnnotation(Timeout::class.java)?.getInstance() // else use withTimeout from class annotation ?: service::class.java.getAnnotation(Timeout::class.java)?.getInstance() // else use service if WithRetry @@ -295,9 +295,9 @@ class TaskExecutor( this.withRetry = // use withRetry from registry, if it exists - registered.withRetry // else use withRetry from method annotation - ?: taskMethod.getAnnotation(Retry::class.java)?.getInstance() + registered.withRetry + ?: taskMethod.getAnnotation(Retry::class.java)?.getInstance() // else use withRetry from class annotation ?: service::class.java.getAnnotation(Retry::class.java)?.getInstance() // else use service if WithRetry diff --git a/infinitic-task-executor/src/test/kotlin/io/infinitic/tasks/executor/samples/SimpleService.kt b/infinitic-task-executor/src/test/kotlin/io/infinitic/tasks/executor/samples/SimpleService.kt index c98f29f84..fd5e83442 100644 --- a/infinitic-task-executor/src/test/kotlin/io/infinitic/tasks/executor/samples/SimpleService.kt +++ b/infinitic-task-executor/src/test/kotlin/io/infinitic/tasks/executor/samples/SimpleService.kt @@ -32,13 +32,17 @@ import io.infinitic.tasks.WithTimeout interface SimpleService { fun handle(i: Int, j: String): String + fun handle(i: Int, j: Int): Int + fun other(i: Int, j: String): String } class ServiceImplService : SimpleService { override fun handle(i: Int, j: String) = (i * j.toInt()).toString() + override fun handle(i: Int, j: Int) = (i * j) + override fun other(i: Int, j: String) = (i * j.toInt()).toString() } @@ -53,6 +57,7 @@ internal class SimpleServiceWithRetry : WithRetry { fun handle(i: Int, j: String): String = if (i < 0) (i * j.toInt()).toString() else throw IllegalStateException() + override fun getSecondsBeforeRetry(retry: Int, exception: Exception) = DELAY } diff --git a/infinitic-task-tag/build.gradle.kts b/infinitic-task-tag/build.gradle.kts index 718a8bb95..21e13b7a4 100644 --- a/infinitic-task-tag/build.gradle.kts +++ b/infinitic-task-tag/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,14 +20,13 @@ * * Licensor: infinitic.io */ - dependencies { - api(Libs.Coroutines.core) - api(Libs.Coroutines.jdk8) + api(Libs.Coroutines.core) + api(Libs.Coroutines.jdk8) - api(project(":infinitic-common")) - api(project(":infinitic-cache")) - api(project(":infinitic-storage")) + api(project(":infinitic-common")) + api(project(":infinitic-cache")) + api(project(":infinitic-storage")) } apply("../publish.gradle.kts") diff --git a/infinitic-tests/build.gradle.kts b/infinitic-tests/build.gradle.kts index bf980daaa..5e28610a1 100644 --- a/infinitic-tests/build.gradle.kts +++ b/infinitic-tests/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,18 +20,17 @@ * * Licensor: infinitic.io */ - dependencies { - testImplementation(Libs.Coroutines.core) - testImplementation(Libs.Coroutines.jdk8) - testImplementation(Libs.Hoplite.core) - testImplementation(Libs.Hoplite.yaml) + testImplementation(Libs.Coroutines.core) + testImplementation(Libs.Coroutines.jdk8) + testImplementation(Libs.Hoplite.core) + testImplementation(Libs.Hoplite.yaml) - testImplementation(project(":infinitic-client")) - testImplementation(project(":infinitic-worker")) - testImplementation(project(":infinitic-workflow-engine")) - testImplementation(project(":infinitic-task-executor")) - testImplementation(project(":infinitic-inMemory")) - testImplementation(project(":infinitic-transport")) - testImplementation(project(":infinitic-pulsar")) + testImplementation(project(":infinitic-client")) + testImplementation(project(":infinitic-worker")) + testImplementation(project(":infinitic-workflow-engine")) + testImplementation(project(":infinitic-task-executor")) + testImplementation(project(":infinitic-inMemory")) + testImplementation(project(":infinitic-transport")) + testImplementation(project(":infinitic-pulsar")) } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/branches/BranchesWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/branches/BranchesWorkflow.kt index 880d893e7..033eff160 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/branches/BranchesWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/branches/BranchesWorkflow.kt @@ -30,12 +30,19 @@ import java.time.Duration interface BranchesWorkflow { fun seq3(): String + fun seq3bis(): String + fun seq4(): String + fun seq4bis(): String + fun deferred1(): String + fun deferred1bis(): String + fun async1() + fun async1bis() } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelWorkflowTests.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelWorkflowTests.kt index 400d4ef04..49f35e09b 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelWorkflowTests.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelWorkflowTests.kt @@ -33,8 +33,8 @@ import io.infinitic.workers.InfiniticWorker import io.kotest.assertions.throwables.shouldThrow import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.shouldBe -import java.time.Instant import kotlinx.coroutines.delay +import java.time.Instant internal class ChannelWorkflowTests : StringSpec({ diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelsWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelsWorkflow.kt index c29cb6594..5dcf7e8d8 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelsWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/channels/ChannelsWorkflow.kt @@ -39,18 +39,31 @@ interface ChannelsWorkflow { val channelB: SendChannel fun channel1(): String + fun channel2(): Any + fun channel3(): Any + fun channel4(): Obj + fun channel4bis(): Obj + fun channel4ter(): Obj + fun channel5(): Obj1 + fun channel5bis(): Obj1 + fun channel5ter(): Obj1 + fun channel6(): String + fun channel6bis(): String + fun channel6ter(): String + fun channel7(count: Int, max: Int? = null): String + fun channel8(): String } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/children/ChildrenWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/children/ChildrenWorkflow.kt index 0456d4653..bcd799867 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/children/ChildrenWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/children/ChildrenWorkflow.kt @@ -31,10 +31,13 @@ interface ChildrenWorkflow { fun await() fun parent(): String + fun wparent(): String fun child1(): String + fun child2(): String + fun factorial(n: Long): Long fun cancel() diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/context/ContextWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/context/ContextWorkflow.kt index 354cd984a..afde832c9 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/context/ContextWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/context/ContextWorkflow.kt @@ -31,13 +31,21 @@ import io.infinitic.workflows.Workflow interface ContextWorkflow { fun context1(): String + fun context2(): Set + fun context3(): WorkflowMeta + fun context4(): String? + fun context5(): String? + fun context6(): Set + fun context7(): TaskMeta + fun context8(): WithRetry? + fun context9(): WithTimeout? } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/deferred/DeferredWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/deferred/DeferredWorkflow.kt index 608d27063..0cf954a53 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/deferred/DeferredWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/deferred/DeferredWorkflow.kt @@ -33,16 +33,27 @@ import java.time.Duration interface DeferredWorkflow { fun await(duration: Long): Long + fun seq1(): String + fun seq2(): String + fun seq5(): Long + fun seq6(): Long + fun or1(): String + fun or2(): Any + fun or3(): String + fun or4(): String + fun and1(): List + fun and2(): List + fun and3(): List } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/errors/ErrorsWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/errors/ErrorsWorkflow.kt index 5f7ad1e75..0957ba985 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/errors/ErrorsWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/errors/ErrorsWorkflow.kt @@ -34,27 +34,45 @@ import java.time.Duration interface ErrorsWorkflow { fun waiting(): String + fun failing1(): String + fun failing2() + fun failing2a(): Long + fun failing3(): Long + fun failing3bis() + fun failing3bException() + fun failing3b(): Long // fun failing4(): Long // fun failing5(): Long fun failing5bis(deferred: Deferred): Long + fun failing6() + fun failing7(): Long + fun failing7bis() + fun failing7ter(): String + fun failing8(): String + fun failing9(): Boolean + fun failing10(): String + fun failing10bis() + fun failing11() + fun failing12(): String + fun failing13() } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/inline/InlineWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/inline/InlineWorkflow.kt index 2c0cb9b44..1ba0318f2 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/inline/InlineWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/inline/InlineWorkflow.kt @@ -27,7 +27,9 @@ import io.infinitic.workflows.Workflow interface InlineWorkflow { fun inline1(i: Int): String + fun inline2(i: Int): String + fun inline3(i: Int): String } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/properties/PropertiesWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/properties/PropertiesWorkflow.kt index ad01ec2f3..1f1cbbe29 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/properties/PropertiesWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/properties/PropertiesWorkflow.kt @@ -29,21 +29,37 @@ import io.infinitic.workflows.Workflow interface PropertiesWorkflow { fun prop1(): String + fun prop1bis() + fun prop2(): String + fun prop2bis() + fun prop3(): String + fun prop3bis() + fun prop4(): String + fun prop4bis() + fun prop5(): String + fun prop5bis() + fun prop5ter() + fun prop6(): String + fun prop6bis(deferred: Deferred): String + fun prop7(): String + fun prop7bis(): String + fun prop8(): String + fun prop8bis() } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/scaffolds/engine.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/scaffolds/engine.kt index b9bd256cb..d3d2a20f7 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/scaffolds/engine.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/scaffolds/engine.kt @@ -22,7 +22,6 @@ */ package io.infinitic.tests.scaffolds -import java.util.concurrent.Executors import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.asCoroutineDispatcher @@ -30,6 +29,7 @@ import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch +import java.util.concurrent.Executors /** * This code checks: diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/syntax/SyntaxWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/syntax/SyntaxWorkflow.kt index ae8caeb16..bed4a78ec 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/syntax/SyntaxWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/syntax/SyntaxWorkflow.kt @@ -28,7 +28,9 @@ import io.infinitic.workflows.Workflow interface SyntaxWorkflow : ParentInterface { fun empty(): String + fun await(duration: Long): Long + fun wparent(): String } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/timers/TimerWorkflowTests.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/timers/TimerWorkflowTests.kt index 5147db5d1..377d0a16c 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/timers/TimerWorkflowTests.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/timers/TimerWorkflowTests.kt @@ -26,136 +26,140 @@ import io.infinitic.clients.InfiniticClient import io.infinitic.common.fixtures.later import io.infinitic.workers.InfiniticWorker import io.kotest.core.spec.style.StringSpec +import io.kotest.matchers.comparables.shouldBeGreaterThanOrEqualTo import io.kotest.matchers.longs.shouldBeGreaterThan import io.kotest.matchers.longs.shouldBeLessThan import io.kotest.matchers.shouldBe import java.time.Instant internal class TimerWorkflowTests : - StringSpec({ + StringSpec( + { - // each test should not be longer than 10s - timeout = 10000 + // each test should not be longer than 10s + timeout = 10000 - val worker = autoClose(InfiniticWorker.fromConfigResource("/pulsar.yml")) - val client = autoClose(InfiniticClient.fromConfigResource("/pulsar.yml")) + val worker = autoClose(InfiniticWorker.fromConfigResource("/pulsar.yml")) + val client = autoClose(InfiniticClient.fromConfigResource("/pulsar.yml")) - val timerWorkflow = client.newWorkflow(TimerWorkflow::class.java, tags = setOf("foo", "bar")) + val timerWorkflow = + client.newWorkflow(TimerWorkflow::class.java, tags = setOf("foo", "bar")) - beforeSpec { worker.startAsync() } + beforeSpec { worker.startAsync() } - beforeTest { worker.registry.flush() } + beforeTest { worker.registry.flush() } - "Wait for a duration timer" { - val start = Instant.now().toEpochMilli() + "Wait for a duration timer" { + val start = Instant.now().toEpochMilli() - val deferred = client.dispatch(timerWorkflow::await, 200L) + val deferred = client.dispatch(timerWorkflow::await, 200L) - (deferred.await().toEpochMilli() - start) shouldBeLessThan (2000L) - } + (deferred.await().toEpochMilli() - start) shouldBeLessThan (2000L) + } + + "Wait for a long duration timer" { + val start = Instant.now().toEpochMilli() - "Wait for a long duration timer" { - val start = Instant.now().toEpochMilli() + val deferred = client.dispatch(timerWorkflow::await, 2000L) - val deferred = client.dispatch(timerWorkflow::await, 2000L) + (deferred.await().toEpochMilli() - start) shouldBeGreaterThan (2000L) + } - (deferred.await().toEpochMilli() - start) shouldBeGreaterThan (2000L) - } + "Wait for a instant timer" { + val start = Instant.now().toEpochMilli() - "Wait for a instant timer" { - val start = Instant.now().toEpochMilli() + val deferred = client.dispatch(timerWorkflow::await, Instant.now().plusMillis(200)) - val deferred = client.dispatch(timerWorkflow::await, Instant.now().plusMillis(200)) + (deferred.await().toEpochMilli() - start) shouldBeLessThan (2000L) + } - (deferred.await().toEpochMilli() - start) shouldBeLessThan (2000L) - } + "Wait for a long instant timer" { + val start = Instant.now().toEpochMilli() - "Wait for a long instant timer" { - val start = Instant.now().toEpochMilli() + val deferred = client.dispatch(timerWorkflow::await, Instant.now().plusMillis(2000)) - val deferred = client.dispatch(timerWorkflow::await, Instant.now().plusMillis(2000)) + (deferred.await().toEpochMilli() - start) shouldBeGreaterThanOrEqualTo (2000L) + } - (deferred.await().toEpochMilli() - start) shouldBeGreaterThan (2000L) - } + "Wait for a timer or a signal - timer wins" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 200L) - "Wait for a timer or a signal - timer wins" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 200L) + deferred.await()::class shouldBe Instant::class + } - deferred.await()::class shouldBe Instant::class - } + "Wait for a timer or a signal - signal wins" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) - "Wait for a timer or a signal - signal wins" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) + later { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + w.channel.send("bingo") + } - later { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - w.channel.send("bingo") + deferred.await() shouldBe "bingo" } - deferred.await() shouldBe "bingo" - } + "Wait for a timer or a signal - timer wins after manual completion by id" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) - "Wait for a timer or a signal - timer wins after manual completion by id" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) + later(200) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + client.completeTimers(w) + } - later(200) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - client.completeTimers(w) - } + later(500) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + w.channel.send("bingo") + } - later(500) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - w.channel.send("bingo") + deferred.await()::class shouldBe Instant::class } - deferred.await()::class shouldBe Instant::class - } + "Wait for a timer or a signal - timer wins after manual completion by tag" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) - "Wait for a timer or a signal - timer wins after manual completion by tag" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) + later(200) { + val w = client.getWorkflowByTag(TimerWorkflow::class.java, "foo") + client.completeTimers(w) + } - later(200) { - val w = client.getWorkflowByTag(TimerWorkflow::class.java, "foo") - client.completeTimers(w) - } + later(500) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + w.channel.send("bingo") + } - later(500) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - w.channel.send("bingo") + deferred.await()::class shouldBe Instant::class } - deferred.await()::class shouldBe Instant::class - } + "Wait for a timer or a signal - signal wins after manual timer completion with wrong methodRunId" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) - "Wait for a timer or a signal - signal wins after manual timer completion with wrong methodRunId" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) + later(200) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + client.completeTimers(w, "wrong") + } - later(200) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - client.completeTimers(w, "wrong") - } + later(500) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + w.channel.send("bingo") + } - later(500) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - w.channel.send("bingo") + deferred.await() shouldBe "bingo" } - deferred.await() shouldBe "bingo" - } + "Wait for a timer or a signal - timer wins after manual completion with correct methodRunId" { + val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) - "Wait for a timer or a signal - timer wins after manual completion with correct methodRunId" { - val deferred = client.dispatch(timerWorkflow::awaitSignal, 10000L) + later(200) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + client.completeTimers(w, deferred.id) + } - later(200) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - client.completeTimers(w, deferred.id) - } + later(500) { + val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) + w.channel.send("bingo") + } - later(500) { - val w = client.getWorkflowById(TimerWorkflow::class.java, deferred.id) - w.channel.send("bingo") + deferred.await()::class shouldBe Instant::class } - - deferred.await()::class shouldBe Instant::class - } - }) + }, + ) diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/TestService.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/TestService.kt index 4704fe3e6..8bfb0164a 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/TestService.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/TestService.kt @@ -27,6 +27,7 @@ import io.infinitic.tasks.WithRetry interface TestService { fun log(): String + fun await(delay: Long): Long } diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilService.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilService.kt index 07c19e4de..f338baffc 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilService.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilService.kt @@ -34,16 +34,25 @@ interface ParentInterface { interface UtilService : ParentInterface { fun concat(str1: String, str2: String): String + fun reverse(str: String): String + fun await(delay: Long): Long + fun workflowId(): String? + fun workflowName(): String? + fun retryFailedTasks(workflowName: String, id: String) + fun cancelWorkflow(workflowName: String, id: String) + fun failing() + fun successAtRetry(): String fun tags(): Set + fun meta(): TaskMeta fun withRetry(): WithRetry? diff --git a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilWorkflow.kt b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilWorkflow.kt index 0e65d29ea..faa3e4fc1 100644 --- a/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilWorkflow.kt +++ b/infinitic-tests/src/test/kotlin/io/infinitic/tests/utils/UtilWorkflow.kt @@ -31,12 +31,19 @@ import io.infinitic.workflows.Workflow interface UtilWorkflow { val log: String val channelA: SendChannel + fun concat(input: String): String + fun receive(str: String): String + fun add(str: String): String + fun factorial(n: Long): Long + fun cancelChild1(): Long + fun cancelChild2(): Long + fun cancelChild2bis(deferred: Deferred): String } diff --git a/infinitic-tests/src/test/resources/simplelogger.properties b/infinitic-tests/src/test/resources/simplelogger.properties index d19220c63..7f5d10e95 100644 --- a/infinitic-tests/src/test/resources/simplelogger.properties +++ b/infinitic-tests/src/test/resources/simplelogger.properties @@ -1,15 +1,11 @@ # SLF4J's SimpleLogger configuration file # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. - # Log file #org.slf4j.simpleLogger.logFile=infinitic.log - - # Default logging detail level for all instances of SimpleLogger. # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, defaults to "info". org.slf4j.simpleLogger.defaultLogLevel=warn - # Logging detail level for a SimpleLogger instance named "xxxxx". # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, the default logging detail level is used. @@ -18,25 +14,20 @@ org.slf4j.simpleLogger.defaultLogLevel=warn #org.slf4j.simpleLogger.log.io.infinitic.transport.inMemory.InMemoryStarter=debug #org.slf4j.simpleLogger.log.io.infinitic.transport.pulsar.PulsarProducer=debug #org.slf4j.simpleLogger.log.io.infinitic.transport.pulsar.PulsarConsumer=debug - # Set to true if you want the current date and time to be included in output messages. # Default is false, and will output the number of milliseconds elapsed since startup. org.slf4j.simpleLogger.showDateTime=true - # The date and time format to be used in the output messages. # The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. # If the format is not specified or is invalid, the default format is used. # The default format is yyyy-MM-dd HH:mm:ss:SSS Z. org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z - # Set to true if you want to output the current thread name. # Defaults to true. org.slf4j.simpleLogger.showThreadName=false - # Set to true if you want the Logger instance name to be included in output messages. # Defaults to true. # org.slf4j.simpleLogger.showLogName=true - # Set to true if you want the last component of the name to be included in output messages. # Defaults to false. org.slf4j.simpleLogger.showShortLogName=true diff --git a/infinitic-transport-inmemory/build.gradle.kts b/infinitic-transport-inmemory/build.gradle.kts index abcee77f7..8c4b4a052 100644 --- a/infinitic-transport-inmemory/build.gradle.kts +++ b/infinitic-transport-inmemory/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,19 +20,18 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Coroutines.core) - implementation(Libs.Coroutines.jdk8) + implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.jdk8) - api(project(":infinitic-common")) - api(project(":infinitic-client-base")) - api(project(":infinitic-storage")) - implementation(project(":infinitic-cache")) - implementation(project(":infinitic-workflow-tag")) - implementation(project(":infinitic-workflow-engine")) - implementation(project(":infinitic-task-tag")) - implementation(project(":infinitic-task-executor")) + api(project(":infinitic-common")) + api(project(":infinitic-client-base")) + api(project(":infinitic-storage")) + implementation(project(":infinitic-cache")) + implementation(project(":infinitic-workflow-tag")) + implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-task-tag")) + implementation(project(":infinitic-task-executor")) } apply("../publish.gradle.kts") diff --git a/infinitic-transport-inmemory/src/main/kotlin/io/infinitic/transport/inMemory/InMemoryStarter.kt b/infinitic-transport-inmemory/src/main/kotlin/io/infinitic/transport/inMemory/InMemoryStarter.kt index fc9d69e22..e6087cb9f 100644 --- a/infinitic-transport-inmemory/src/main/kotlin/io/infinitic/transport/inMemory/InMemoryStarter.kt +++ b/infinitic-transport-inmemory/src/main/kotlin/io/infinitic/transport/inMemory/InMemoryStarter.kt @@ -51,13 +51,13 @@ import io.infinitic.tasks.executor.TaskExecutor import io.infinitic.tasks.tag.TaskTagEngine import io.infinitic.workflows.engine.WorkflowEngine import io.infinitic.workflows.tag.WorkflowTagEngine -import java.util.concurrent.CompletableFuture -import java.util.concurrent.ConcurrentHashMap import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.delay import kotlinx.coroutines.future.future import mu.KotlinLogging +import java.util.concurrent.CompletableFuture +import java.util.concurrent.ConcurrentHashMap class InMemoryStarter(private val scope: CoroutineScope, name: String) : ClientStarter, WorkerStarter { diff --git a/infinitic-transport-inmemory/src/test/resources/simplelogger.properties b/infinitic-transport-inmemory/src/test/resources/simplelogger.properties index 6cab8950b..61abd000d 100644 --- a/infinitic-transport-inmemory/src/test/resources/simplelogger.properties +++ b/infinitic-transport-inmemory/src/test/resources/simplelogger.properties @@ -1,23 +1,17 @@ # SLF4J's SimpleLogger configuration file # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. - # Uncomment this line to use a log file #org.slf4j.simpleLogger.logFile=infinitic.log - # Default logging detail level for all instances of SimpleLogger. # Must be one of ("trace", "debug", "info", "warn", or "error"). # If not specified, defaults to "info". org.slf4j.simpleLogger.defaultLogLevel=info - # Set to true if you want the current date and time to be included in output messages. # Default is false, and will output the number of milliseconds elapsed since startup. org.slf4j.simpleLogger.showDateTime=true - # Set to true if you want to output the current thread name. # Defaults to true. org.slf4j.simpleLogger.showThreadName=false - - # Set to true if you want the last component of the name to be included in output messages. # Defaults to false. org.slf4j.simpleLogger.showShortLogName=true diff --git a/infinitic-transport-pulsar/build.gradle.kts b/infinitic-transport-pulsar/build.gradle.kts index a5206714f..0da09441f 100644 --- a/infinitic-transport-pulsar/build.gradle.kts +++ b/infinitic-transport-pulsar/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,22 +20,21 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Coroutines.core) - implementation(Libs.Hoplite.core) - implementation(Libs.Pulsar.client) - implementation(Libs.Pulsar.clientAdmin) - implementation(Libs.Pulsar.authAthenz) - implementation(Libs.Pulsar.authSasl) - implementation(Libs.Pulsar.functions) + implementation(Libs.Coroutines.core) + implementation(Libs.Hoplite.core) + implementation(Libs.Pulsar.client) + implementation(Libs.Pulsar.clientAdmin) + implementation(Libs.Pulsar.authAthenz) + implementation(Libs.Pulsar.authSasl) + implementation(Libs.Pulsar.functions) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-client-base")) - implementation(project(":infinitic-workflow-engine")) - implementation(project(":infinitic-workflow-tag")) - implementation(project(":infinitic-task-tag")) - implementation(project(":infinitic-task-executor")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-client-base")) + implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-workflow-tag")) + implementation(project(":infinitic-task-tag")) + implementation(project(":infinitic-task-executor")) } apply("../publish.gradle.kts") diff --git a/infinitic-transport-pulsar/src/main/kotlin/io/infinitic/transport/pulsar/topics/TopicNames.kt b/infinitic-transport-pulsar/src/main/kotlin/io/infinitic/transport/pulsar/topics/TopicNames.kt index 77500edbb..4332ba307 100644 --- a/infinitic-transport-pulsar/src/main/kotlin/io/infinitic/transport/pulsar/topics/TopicNames.kt +++ b/infinitic-transport-pulsar/src/main/kotlin/io/infinitic/transport/pulsar/topics/TopicNames.kt @@ -41,12 +41,15 @@ interface TopicNames { fun topic(type: ClientTopics, clientName: ClientName): String fun topic(type: WorkflowTopics, workflowName: WorkflowName): String + fun topicDLQ(type: WorkflowTopics, workflowName: WorkflowName): String fun topic(type: ServiceTopics, serviceName: ServiceName): String + fun topicDLQ(type: ServiceTopics, serviceName: ServiceName): String fun topic(type: WorkflowTaskTopics, workflowName: WorkflowName): String + fun topicDLQ(type: WorkflowTaskTopics, workflowName: WorkflowName): String fun topic(type: TopicType, name: String) = diff --git a/infinitic-transport/build.gradle.kts b/infinitic-transport/build.gradle.kts index 20e8658bd..30be983de 100644 --- a/infinitic-transport/build.gradle.kts +++ b/infinitic-transport/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,9 +20,6 @@ * * Licensor: infinitic.io */ - -dependencies { - api(project(":infinitic-transport-pulsar")) -} +dependencies { api(project(":infinitic-transport-pulsar")) } apply("../publish.gradle.kts") diff --git a/infinitic-worker-base/build.gradle.kts b/infinitic-worker-base/build.gradle.kts index 1d4d69f2c..4b61e6127 100644 --- a/infinitic-worker-base/build.gradle.kts +++ b/infinitic-worker-base/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,21 +20,20 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(kotlin("reflect")) - implementation(Libs.Coroutines.core) - implementation(Libs.Coroutines.jdk8) + implementation(kotlin("reflect")) + implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.jdk8) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-storage")) - implementation(project(":infinitic-cache")) - implementation(project(":infinitic-task-tag")) - implementation(project(":infinitic-workflow-tag")) - implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-storage")) + implementation(project(":infinitic-cache")) + implementation(project(":infinitic-task-tag")) + implementation(project(":infinitic-workflow-tag")) + implementation(project(":infinitic-workflow-engine")) - testImplementation(Libs.Hoplite.core) - testImplementation(Libs.Hoplite.yaml) + testImplementation(Libs.Hoplite.core) + testImplementation(Libs.Hoplite.yaml) } apply("../publish.gradle.kts") diff --git a/infinitic-worker-base/src/main/kotlin/io/infinitic/workers/WorkerAbstract.kt b/infinitic-worker-base/src/main/kotlin/io/infinitic/workers/WorkerAbstract.kt index 3f6c4c145..281ecf5c3 100644 --- a/infinitic-worker-base/src/main/kotlin/io/infinitic/workers/WorkerAbstract.kt +++ b/infinitic-worker-base/src/main/kotlin/io/infinitic/workers/WorkerAbstract.kt @@ -25,11 +25,11 @@ package io.infinitic.workers import io.infinitic.common.clients.ClientFactory import io.infinitic.common.workers.WorkerStarter import io.infinitic.workers.register.WorkerRegister -import java.util.concurrent.CompletableFuture import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.job import mu.KotlinLogging +import java.util.concurrent.CompletableFuture @Suppress("MemberVisibilityCanBePrivate", "unused") abstract class WorkerAbstract(val workerRegister: WorkerRegister) : diff --git a/infinitic-worker/build.gradle.kts b/infinitic-worker/build.gradle.kts index c9ee89864..aa46a472b 100644 --- a/infinitic-worker/build.gradle.kts +++ b/infinitic-worker/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,29 +20,28 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(kotlin("reflect")) - implementation(Libs.Coroutines.core) - implementation(Libs.Coroutines.jdk8) + implementation(kotlin("reflect")) + implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.jdk8) - api(project(":infinitic-worker-base")) - api(project(":infinitic-workflow-tag")) - api(project(":infinitic-task-tag")) - api(project(":infinitic-storage")) - api(project(":infinitic-cache")) + api(project(":infinitic-worker-base")) + api(project(":infinitic-workflow-tag")) + api(project(":infinitic-task-tag")) + api(project(":infinitic-storage")) + api(project(":infinitic-cache")) - implementation(project(":infinitic-client-base")) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-transport")) - implementation(project(":infinitic-task-executor")) - implementation(project(":infinitic-workflow-engine")) - implementation(project(":infinitic-workflow-task")) - implementation(project(":infinitic-pulsar")) - implementation(project(":infinitic-inMemory")) + implementation(project(":infinitic-client-base")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-transport")) + implementation(project(":infinitic-task-executor")) + implementation(project(":infinitic-workflow-engine")) + implementation(project(":infinitic-workflow-task")) + implementation(project(":infinitic-pulsar")) + implementation(project(":infinitic-inMemory")) - testImplementation(Libs.Hoplite.core) - testImplementation(Libs.Hoplite.yaml) + testImplementation(Libs.Hoplite.core) + testImplementation(Libs.Hoplite.yaml) } apply("../publish.gradle.kts") diff --git a/infinitic-worker/src/main/kotlin/io/infinitic/workers/config/Workflow.kt b/infinitic-worker/src/main/kotlin/io/infinitic/workers/config/Workflow.kt index 93bcb6a3d..5b3dae782 100644 --- a/infinitic-worker/src/main/kotlin/io/infinitic/workers/config/Workflow.kt +++ b/infinitic-worker/src/main/kotlin/io/infinitic/workers/config/Workflow.kt @@ -24,11 +24,11 @@ package io.infinitic.workers.config import io.infinitic.common.workers.config.RetryPolicy import io.infinitic.workers.register.WorkerRegister -import io.infinitic.workflows.Workflow as WorkflowBase import io.infinitic.workflows.Workflow import io.infinitic.workflows.WorkflowCheckMode import io.infinitic.workflows.engine.config.WorkflowEngine import io.infinitic.workflows.tag.config.WorkflowTag +import io.infinitic.workflows.Workflow as WorkflowBase data class Workflow( val name: String, diff --git a/infinitic-workflow-engine/build.gradle.kts b/infinitic-workflow-engine/build.gradle.kts index 05d33e7e5..e133e23f0 100644 --- a/infinitic-workflow-engine/build.gradle.kts +++ b/infinitic-workflow-engine/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,14 +20,13 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(Libs.Coroutines.core) + implementation(Libs.Coroutines.core) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-cache")) - implementation(project(":infinitic-storage")) - implementation(project(":infinitic-task-executor")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-cache")) + implementation(project(":infinitic-storage")) + implementation(project(":infinitic-task-executor")) } apply("../publish.gradle.kts") diff --git a/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/WorkflowEngine.kt b/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/WorkflowEngine.kt index b2a8c78e0..1abd851d1 100644 --- a/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/WorkflowEngine.kt +++ b/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/WorkflowEngine.kt @@ -237,7 +237,7 @@ class WorkflowEngine( // process all buffered messages while (state.runningWorkflowTaskId == null && // if a workflowTask is not ongoing - state.messagesBuffer.size > 0 // if there is some buffered message + state.messagesBuffer.size > 0 // if there is some buffered message ) { val bufferedMsg = state.messagesBuffer.removeAt(0) logger.debug { diff --git a/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/handlers/SendSignal.kt b/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/handlers/SendSignal.kt index fe08348c4..296d34b83 100644 --- a/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/handlers/SendSignal.kt +++ b/infinitic-workflow-engine/src/main/kotlin/io/infinitic/workflows/engine/handlers/SendSignal.kt @@ -62,6 +62,5 @@ internal fun CoroutineScope.sendSignal( returnValue = ReturnValue(message.signalData.serializedData), completionWorkflowTaskIndex = state.workflowTaskIndex, signalId = message.signalId)) - } - ?: logger.debug { "discarding non-waited signal $message" } + } ?: logger.debug { "discarding non-waited signal $message" } } diff --git a/infinitic-workflow-engine/src/test/kotlin/io/infinitic/workflows/engine/WorkflowEngineTests.kt b/infinitic-workflow-engine/src/test/kotlin/io/infinitic/workflows/engine/WorkflowEngineTests.kt index e37536247..7c39040a4 100644 --- a/infinitic-workflow-engine/src/test/kotlin/io/infinitic/workflows/engine/WorkflowEngineTests.kt +++ b/infinitic-workflow-engine/src/test/kotlin/io/infinitic/workflows/engine/WorkflowEngineTests.kt @@ -55,8 +55,8 @@ import io.mockk.coEvery import io.mockk.just import io.mockk.mockk import io.mockk.slot -import java.util.concurrent.CopyOnWriteArrayList import kotlinx.coroutines.coroutineScope +import java.util.concurrent.CopyOnWriteArrayList class WorkflowEngineTests : StringSpec({ diff --git a/infinitic-workflow-tag/build.gradle.kts b/infinitic-workflow-tag/build.gradle.kts index 718a8bb95..21e13b7a4 100644 --- a/infinitic-workflow-tag/build.gradle.kts +++ b/infinitic-workflow-tag/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,14 +20,13 @@ * * Licensor: infinitic.io */ - dependencies { - api(Libs.Coroutines.core) - api(Libs.Coroutines.jdk8) + api(Libs.Coroutines.core) + api(Libs.Coroutines.jdk8) - api(project(":infinitic-common")) - api(project(":infinitic-cache")) - api(project(":infinitic-storage")) + api(project(":infinitic-common")) + api(project(":infinitic-cache")) + api(project(":infinitic-storage")) } apply("../publish.gradle.kts") diff --git a/infinitic-workflow-task/build.gradle.kts b/infinitic-workflow-task/build.gradle.kts index 6513a1a69..94272aa58 100644 --- a/infinitic-workflow-task/build.gradle.kts +++ b/infinitic-workflow-task/build.gradle.kts @@ -1,20 +1,18 @@ /** * "Commons Clause" License Condition v1.0 * - * The Software is provided to you by the Licensor under the License, as defined - * below, subject to the following condition. + * The Software is provided to you by the Licensor under the License, as defined below, subject to + * the following condition. * - * Without limiting other conditions in the License, the grant of rights under the - * License will not include, and the License does not grant to you, the right to - * Sell the Software. + * Without limiting other conditions in the License, the grant of rights under the License will not + * include, and the License does not grant to you, the right to Sell the Software. * - * For purposes of the foregoing, “Sell” means practicing any or all of the rights - * granted to you under the License to provide to third parties, for a fee or - * other consideration (including without limitation fees for hosting or - * consulting/ support services related to the Software), a product or service - * whose value derives, entirely or substantially, from the functionality of the - * Software. Any license notice or attribution required by the License must also - * include this Commons Clause License Condition notice. + * For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you + * under the License to provide to third parties, for a fee or other consideration (including + * without limitation fees for hosting or consulting/ support services related to the Software), a + * product or service whose value derives, entirely or substantially, from the functionality of the + * Software. Any license notice or attribution required by the License must also include this + * Commons Clause License Condition notice. * * Software: Infinitic * @@ -22,14 +20,13 @@ * * Licensor: infinitic.io */ - dependencies { - implementation(kotlin("reflect")) - implementation(Libs.Coroutines.core) - implementation(Libs.JsonPath.jayway) + implementation(kotlin("reflect")) + implementation(Libs.Coroutines.core) + implementation(Libs.JsonPath.jayway) - implementation(project(":infinitic-common")) - implementation(project(":infinitic-client-base")) + implementation(project(":infinitic-common")) + implementation(project(":infinitic-client-base")) } apply("../publish.gradle.kts") diff --git a/infinitic-workflow-task/src/test/kotlin/io/infinitic/workflows/workflowTask/workflows/WorkflowA.kt b/infinitic-workflow-task/src/test/kotlin/io/infinitic/workflows/workflowTask/workflows/WorkflowA.kt index 5bf78900e..47de851a8 100644 --- a/infinitic-workflow-task/src/test/kotlin/io/infinitic/workflows/workflowTask/workflows/WorkflowA.kt +++ b/infinitic-workflow-task/src/test/kotlin/io/infinitic/workflows/workflowTask/workflows/WorkflowA.kt @@ -26,10 +26,10 @@ import io.infinitic.annotations.Ignore import io.infinitic.workflows.SendChannel import io.infinitic.workflows.Workflow import io.infinitic.workflows.workflowTask.tasks.TaskA -import java.util.UUID import kotlinx.serialization.Serializable import mu.KotlinLogging import org.slf4j.LoggerFactory +import java.util.* sealed class Obj diff --git a/pulsar/README.md b/pulsar/README.md index 49faf9f60..128261ce4 100644 --- a/pulsar/README.md +++ b/pulsar/README.md @@ -3,10 +3,11 @@ ## Run Standalone Pulsar > Create those directories, if you don't have them yet: -/engine/build/libs -/engine/build/schemas +> /engine/build/libs +> /engine/build/schemas In the same directory than `docker-compose.yaml`, do: + ```bash docker-compose up ``` @@ -18,26 +19,31 @@ docker exec -it pulsar_pulsar_1 /bin/bash ``` To clean everything + ```bash docker-compose down --volumes ``` To install Infinitic: + ```bash gradle install ``` To remove Infinitic + ```bash gradle delete ``` To update Infinitic + ```bash gradle update ``` ## Pulsar Manager + Once Docker run, you can access it at `http://localhost:9527` Create an admin user with: @@ -59,5 +65,6 @@ To obtain the service url of Pulsar *from the Pulsar Manager container*, do: ```bash docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pulsar-pulsar-1 ``` + you should obtain something like `172.18.0.3`. Then the service url to use for adding an environment is `http://172.18.0.3:8080`