Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NU-1777] Separate classloader for deployment managers #7335

Open
wants to merge 99 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
8adbf62
wip
mk-software-pl Nov 12, 2024
aae2697
wip
mk-software-pl Nov 18, 2024
5016531
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Dec 3, 2024
0aab679
added: test
mk-software-pl Dec 11, 2024
492a8a5
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Dec 11, 2024
69b16bd
wip
mk-software-pl Dec 12, 2024
76aa445
wip
mk-software-pl Dec 13, 2024
3b5e463
wip
mk-software-pl Dec 13, 2024
679ba89
wip
mk-software-pl Dec 13, 2024
3c81ad9
Merge branch 'staging' into change/NU-1777
coutoPL Dec 13, 2024
f05afa7
Merge branch 'staging' into change/NU-1777
coutoPL Dec 13, 2024
bad1538
wip
mk-software-pl Dec 13, 2024
078ae59
cypress tests fix
mk-software-pl Dec 14, 2024
a9e6b27
fix
mk-software-pl Dec 14, 2024
5a06033
fix
mk-software-pl Dec 14, 2024
b110061
improvements
mk-software-pl Dec 14, 2024
ad6f1f0
cleanup
mk-software-pl Dec 14, 2024
7d285f4
fix
mk-software-pl Dec 15, 2024
807e1b9
fix
mk-software-pl Dec 16, 2024
9a50dcf
review fix
mk-software-pl Dec 16, 2024
d4682e2
wip
mk-software-pl Dec 16, 2024
0bd104e
fix
mk-software-pl Dec 16, 2024
b49d999
Merge branch 'staging' into change/NU-1777
coutoPL Dec 16, 2024
37940bc
review fixes
mk-software-pl Dec 16, 2024
f7695c7
review fixes
mk-software-pl Dec 17, 2024
a2cb852
review fixes
mk-software-pl Dec 17, 2024
1dac5c7
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Dec 17, 2024
c50521e
wip
mk-software-pl Jan 7, 2025
fee3f43
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 8, 2025
b46372c
wip
mk-software-pl Jan 8, 2025
1236a92
wip
mk-software-pl Jan 8, 2025
673a1ac
fix: sbt installed explicitly in the runner image in the setup stage
mk-software-pl Jan 8, 2025
8ef1525
test
mk-software-pl Jan 8, 2025
4598673
test
mk-software-pl Jan 8, 2025
706c66a
fix
mk-software-pl Jan 8, 2025
4140164
fix
mk-software-pl Jan 8, 2025
8a4225a
Merge branch 'staging' into fix/explicity_install_sbt_in_pipeline
coutoPL Jan 8, 2025
5fd02c3
review fixes
mk-software-pl Jan 8, 2025
f34a589
revert
mk-software-pl Jan 8, 2025
6cf7695
Merge branch 'fix/explicity_install_sbt_in_pipeline' into change/NU-1777
mk-software-pl Jan 8, 2025
864d8bc
fix
mk-software-pl Jan 8, 2025
9d7a612
fix
mk-software-pl Jan 8, 2025
80f6412
Merge branch 'staging' into change/NU-1777
coutoPL Jan 8, 2025
e15ddea
fix
mk-software-pl Jan 8, 2025
6a0620c
fix
mk-software-pl Jan 8, 2025
eb901db
fix
mk-software-pl Jan 8, 2025
0dbe366
fix
mk-software-pl Jan 8, 2025
0dee027
fix
mk-software-pl Jan 9, 2025
e437e09
fix
mk-software-pl Jan 9, 2025
7f0ffff
Merge branch 'staging' into change/NU-1777
coutoPL Jan 9, 2025
b07aedb
fix
mk-software-pl Jan 9, 2025
1e7f29e
wip
mk-software-pl Jan 9, 2025
09103b2
fix
mk-software-pl Jan 9, 2025
b2b96bd
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 9, 2025
8523b9a
wip
mk-software-pl Jan 10, 2025
3c9c0ff
Merge branch 'refactoring/NU-1777_nu_runtime_app' into change/NU-1777
mk-software-pl Jan 10, 2025
71346a6
cleanup
mk-software-pl Jan 10, 2025
c7fd4fc
Merge branch 'staging' into refactoring/NU-1777_nu_runtime_app
mk-software-pl Jan 10, 2025
8ff3c82
[Nu-7393] Improve error messages while testing scenario from file (#7…
DeamonDev Jan 10, 2025
6a97978
[NU-1944] Fix spel evaluation error when using conversion extensions …
arkadius Jan 10, 2025
0bc4361
[NU-1828] Notification reloading creator panel when configuration rel…
arkadius Jan 10, 2025
672e9aa
cypress test fix attempt: added force: true option to cy.type
arkadius Jan 10, 2025
a727eee
Revert "cypress test fix attempt: added force: true option to cy.type"
arkadius Jan 11, 2025
daca507
[NU-1958] Add toInteger conversion (#7420)
paw787878 Jan 14, 2025
cc3bb52
max 6.x version of react-router (#7440)
JulianWielga Jan 14, 2025
da132fc
Map int32 integer format in OpenAPI schema to the `Integer` type (#7438)
piotrp Jan 14, 2025
aaf4db0
react router fix (#7444)
Dzuming Jan 14, 2025
1833c06
Sticky notes (#7277)
philemone Jan 14, 2025
7584bbd
Merge remote-tracking branch 'origin/staging' into refactoring/NU-177…
mk-software-pl Jan 15, 2025
257bbc9
Merge branch 'staging' into refactoring/NU-1777_nu_runtime_app
mk-software-pl Jan 15, 2025
79bda0b
Merge branch 'refactoring/NU-1777_nu_runtime_app' into change/NU-1777
mk-software-pl Jan 15, 2025
3916717
review fixes
mk-software-pl Jan 15, 2025
a22ae2f
review fixes
mk-software-pl Jan 15, 2025
48bd8a8
fix
mk-software-pl Jan 15, 2025
eacf471
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 16, 2025
2aee8d9
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 16, 2025
c6ab621
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 17, 2025
4a5dd22
:fix
mk-software-pl Jan 17, 2025
d91a82c
fix
mk-software-pl Jan 17, 2025
a77783a
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 17, 2025
ffd9e66
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 17, 2025
74d3d1e
Merge branch 'staging' into change/NU-1777
mk-software-pl Jan 17, 2025
e24b523
[Fix] Passing Flink Job Global Params (#7324) (#7470)
lciolecki Jan 18, 2025
1ff6224
fix (#7457)
Dzuming Jan 18, 2025
6ef470b
Merge remote-tracking branch 'origin/staging' into change/NU-1777
mk-software-pl Jan 20, 2025
a0d11c3
additional logging
mk-software-pl Jan 20, 2025
c1bf1b2
Merge branch 'staging' into change/NU-1777
coutoPL Jan 20, 2025
6e891a9
check
mk-software-pl Jan 20, 2025
0f685a1
check
mk-software-pl Jan 20, 2025
f31b6bf
check
mk-software-pl Jan 20, 2025
4d72c19
check
mk-software-pl Jan 20, 2025
d7b8906
check
mk-software-pl Jan 20, 2025
8fccccf
check
mk-software-pl Jan 21, 2025
2a64940
check
mk-software-pl Jan 21, 2025
5b203fa
check
mk-software-pl Jan 21, 2025
d85cb22
revert
mk-software-pl Jan 21, 2025
51b64ba
Merge branch 'staging' into change/NU-1777
coutoPL Jan 21, 2025
d0f3f24
log level
mk-software-pl Jan 21, 2025
79122e3
pipeline fix
mk-software-pl Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .run/NussknackerApp.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="NussknackerApp" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="corretto-11" />
<option name="ALTERNATIVE_JRE_PATH" value="11" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="AUTHENTICATION_USERS_FILE" value="../../../nussknacker-dist/src/universal/conf/users.conf" />
Expand All @@ -9,15 +9,16 @@
<env name="FLINK_SHOULD_VERIFY_BEFORE_DEPLOY" value="false" />
<env name="GRAFANA_URL" value="http://localhost:8081/grafana" />
<env name="INFLUXDB_URL" value="http://localhost:3086" />
<env name="INPUT_CONFIG_RESOLVE_ENV_VARIABLES" value="false" />
<env name="KAFKA_ADDRESS" value="localhost:3032" />
<env name="MANAGERS_DIR" value="managers" />
<env name="NUSSKNACKER_LOG_LEVEL" value="DEBUG" />
<env name="OPENAPI_SERVICE_URL" value="http://localhost:5000" />
<env name="SCHEMA_REGISTRY_URL" value="http://localhost:3082" />
<env name="SQL_ENRICHER_URL" value="localhost:5432" />
<env name="TABLES_DEFINITION_FILE" value="../../../nussknacker-dist/src/universal/conf/dev-tables-definition.sql" />
<env name="USAGE_REPORTS_FINGERPRINT" value="development" />
<env name="USAGE_REPORTS_SOURCE" value="sources" />
<env name="INPUT_CONFIG_RESOLVE_ENV_VARIABLES" value="false" />
<env name="TABLES_DEFINITION_FILE" value="../../../nussknacker-dist/src/universal/conf/dev-tables-definition.sql" />
</envs>
<option name="INCLUDE_PROVIDED_SCOPE" value="true" />
<option name="MAIN_CLASS_NAME" value="pl.touk.nussknacker.ui.NussknackerApp" />
Expand All @@ -34,4 +35,4 @@
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
27 changes: 13 additions & 14 deletions .run/NussknackerRemoteDebug.run.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<component name="ProjectRunConfigurationManager">
<configuration name="NussknackerRemoteDebug" type="Remote">
<module name="nussknacker-designer" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5005" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
<configuration default="false" name="NussknackerRemoteDebug" type="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5005" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>
110 changes: 57 additions & 53 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ lazy val silencerV_2_12 = "1.6.0"
def propOrEnv(name: String, default: String): String = propOrEnv(name).getOrElse(default)
def propOrEnv(name: String): Option[String] = Option(System.getProperty(name)).orElse(sys.env.get(name))

//by default we include flink and scala, we want to be able to disable this behaviour for performance reasons
val includeFlinkAndScala = propOrEnv("includeFlinkAndScala", "true").toBoolean

val flinkScope = if (includeFlinkAndScala) "compile" else "provided"
val nexusUrlFromProps = propOrEnv("nexusUrl")
//TODO: this is pretty clunky, but works so far for our case...
val nexusHostFromProps = nexusUrlFromProps.map(_.replaceAll("http[s]?://", "").replaceAll("[:/].*", ""))
Expand Down Expand Up @@ -103,7 +99,7 @@ lazy val publishSettings = Seq(
)

def defaultMergeStrategy: String => MergeStrategy = {
// remove JPMS module descriptors (a proper soultion would be to merge them)
// remove JPMS module descriptors (a proper solution would be to merge them)
case PathList(ps @ _*) if ps.last == "module-info.class" => MergeStrategy.discard
// we override Spring's class and we want to keep only our implementation
case PathList(ps @ _*) if ps.last == "NumberUtils.class" => MergeStrategy.first
Expand All @@ -118,7 +114,8 @@ def designerMergeStrategy: String => MergeStrategy = {
// https://tapir.softwaremill.com/en/latest/docs/openapi.html#using-swaggerui-with-sbt-assembly
case PathList("META-INF", "maven", "org.webjars", "swagger-ui", "pom.properties") =>
MergeStrategy.singleOrError
case x => defaultMergeStrategy(x)
case x =>
defaultMergeStrategy(x)
}

val scalaTestReports = Tests.Argument(TestFrameworks.ScalaTest, "-u", "target/surefire-reports", "-oFGD")
Expand Down Expand Up @@ -438,7 +435,8 @@ def assemblySettings(
includeScala: Boolean,
filterProvidedDeps: Boolean = true
): List[Def.SettingsDefinition] = {
// This work around need to be optional because for designer module it causes excluding of scala lib (because we has there other work around for Idea classpath and provided deps)
// This work around need to be optional because for designer module it causes excluding of scala lib
// (because we have there other work around for Idea classpath and provided deps)
coutoPL marked this conversation as resolved.
Show resolved Hide resolved
val filterProvidedDepsSettingOpt = if (filterProvidedDeps) {
Some(
// For some reason problem described in https://github.com/sbt/sbt-assembly/issues/295 appears, workaround also works...
Expand Down Expand Up @@ -470,7 +468,7 @@ lazy val modelArtifacts = taskKey[List[(File, String)]]("model artifacts")

lazy val devArtifacts = taskKey[List[(File, String)]]("dev artifacts")

lazy val managerArtifacts = taskKey[List[(File, String)]]("manager artifacts")
lazy val deploymentManagerArtifacts = taskKey[List[(File, String)]]("deployment manager artifacts")

def filterDevConfigArtifacts(files: Seq[(File, String)]) = {
val devConfigFiles = Set("dev-tables-definition.sql", "dev-application.conf", "dev-oauth2-users.conf")
Expand All @@ -482,7 +480,7 @@ lazy val distribution: Project = sbt
.settings(commonSettings)
.enablePlugins(JavaAgent, SbtNativePackager, JavaServerAppPackaging)
.settings(
managerArtifacts := {
deploymentManagerArtifacts := {
List(
(flinkDeploymentManager / assembly).value -> "managers/nussknacker-flink-manager.jar",
(liteK8sDeploymentManager / assembly).value -> "managers/lite-k8s-manager.jar",
Expand Down Expand Up @@ -521,7 +519,7 @@ lazy val distribution: Project = sbt
else filterDevConfigArtifacts((Universal / mappings).value)

universalMappingsWithDevConfigFilter ++
(managerArtifacts).value ++
(deploymentManagerArtifacts).value ++
(componentArtifacts).value ++
(if (addDevArtifacts)
Seq((developmentTestsDeploymentManager / assembly).value -> "managers/development-tests-manager.jar")
Expand Down Expand Up @@ -610,18 +608,16 @@ lazy val flinkDeploymentManager = (project in flink("management"))
IntegrationTest / parallelExecution := false,
libraryDependencies ++= {
Seq(
"org.typelevel" %% "cats-core" % catsV % Provided,
"org.apache.flink" % "flink-streaming-java" % flinkV % flinkScope
excludeAll (
ExclusionRule("log4j", "log4j"),
ExclusionRule("org.slf4j", "slf4j-log4j12"),
ExclusionRule("com.esotericsoftware", "kryo-shaded"),
),
"org.apache.flink" % "flink-statebackend-rocksdb" % flinkV % flinkScope,
"com.softwaremill.retry" %% "retry" % retryV,
"org.wiremock" % "wiremock" % wireMockV % Test,
"org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test,
) ++ flinkLibScalaDeps(scalaVersion.value, Some(flinkScope))
"org.typelevel" %% "cats-core" % catsV % Provided,
"org.apache.flink" % "flink-streaming-java" % flinkV excludeAll (
ExclusionRule("log4j", "log4j"),
ExclusionRule("org.slf4j", "slf4j-log4j12"),
ExclusionRule("com.esotericsoftware", "kryo-shaded"),
),
"com.softwaremill.retry" %% "retry" % retryV,
"org.wiremock" % "wiremock" % wireMockV % Test,
"org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test,
) ++ flinkLibScalaDeps(scalaVersion.value)
},
// override scala-collection-compat from com.softwaremill.retry:retry
dependencyOverrides += "org.scala-lang.modules" %% "scala-collection-compat" % scalaCollectionsCompatV
Expand All @@ -644,6 +640,7 @@ lazy val flinkPeriodicDeploymentManager = (project in flink("management/periodic
name := "nussknacker-flink-periodic-manager",
libraryDependencies ++= {
Seq(
"org.apache.flink" % "flink-core" % flinkV % Provided,
"org.typelevel" %% "cats-core" % catsV % Provided,
"com.typesafe.slick" %% "slick" % slickV % Provided,
"com.typesafe.slick" %% "slick-hikaricp" % slickV % "provided, test",
Expand Down Expand Up @@ -1812,9 +1809,8 @@ lazy val flinkBaseUnboundedComponents = (project in flink("components/base-unbou
name := "nussknacker-flink-base-unbounded-components",
libraryDependencies ++= Seq(
"org.apache.flink" % "flink-streaming-java" % flinkV % Provided,
"com.clearspring.analytics" % "stream" % "2.9.8"
// It is used only in QDigest which we don't use, while it's >20MB in size...
exclude ("it.unimi.dsi", "fastutil")
"com.clearspring.analytics" % "stream" % "2.9.8" exclude ("it.unimi.dsi", "fastutil")
)
)
.dependsOn(
Expand Down Expand Up @@ -1940,6 +1936,10 @@ lazy val deploymentManagerApi = (project in file("designer/deployment-manager-ap
)
.dependsOn(extensionsApi, testUtils % Test)

lazy val prepareDesignerTests = taskKey[Unit]("Prepare all necessary artifacts before running designer module tests")
lazy val prepareDesignerSlowTests =
taskKey[Unit]("Prepare all necessary artifacts before running designer module slow tests")

lazy val designer = (project in file("designer/server"))
.configs(SlowTests)
.enablePlugins(GenerateDesignerOpenApiPlugin)
Expand All @@ -1948,7 +1948,7 @@ lazy val designer = (project in file("designer/server"))
.settings(
assemblySettings(
"nussknacker-designer-assembly.jar",
includeScala = includeFlinkAndScala,
includeScala = true,
filterProvidedDeps = false
): _*
)
Expand All @@ -1970,24 +1970,36 @@ lazy val designer = (project in file("designer/server"))
CopyOptions.apply(overwrite = true, preserveLastModified = true, preserveExecutable = false)
)
},
ThisBuild / parallelExecution := false,
SlowTests / test := (SlowTests / test)
.dependsOn(
flinkDevModel / Compile / assembly,
flinkExecutor / Compile / assembly
)
.value,
Test / test := (Test / test)
.dependsOn(
defaultModel / Compile / assembly,
flinkTableApiComponents / Compile / assembly,
flinkDevModel / Compile / assembly,
flinkExecutor / Compile / assembly,
flinkExecutor / prepareItLibs
)
.value,
prepareDesignerSlowTests := {
(flinkDeploymentManager / assembly).value
(liteEmbeddedDeploymentManager / assembly).value
(liteK8sDeploymentManager / assembly).value
(flinkDevModel / assembly).value
(flinkExecutor / assembly).value
},
prepareDesignerTests := {
arkadius marked this conversation as resolved.
Show resolved Hide resolved
(flinkDeploymentManager / assembly).value
(liteEmbeddedDeploymentManager / assembly).value
(liteK8sDeploymentManager / assembly).value
(defaultModel / assembly).value
(flinkTableApiComponents / assembly).value
(flinkDevModel / assembly).value
(flinkExecutor / assembly).value
(flinkExecutor / prepareItLibs).value
},
ThisBuild / parallelExecution := false,
SlowTests / test := (SlowTests / test).dependsOn(prepareDesignerSlowTests).value,
SlowTests / testOptions += Tests.Setup(() => prepareDesignerSlowTests.value),
Test / test := (Test / test).dependsOn(prepareDesignerTests).value,
Test / testOptions += Tests.Setup(() => prepareDesignerTests.value),
/*
We depend on copyClientDist in packageBin and assembly to be make sure fe files will be included in jar and fajar
We depend on copyClientDist in packageBin and assembly to be make sure FE files will be included in jar and fajar
We abuse sbt a little bit, but we don't want to put webpack in generate resources phase, as it's long and it would
make compilation v. long. This is not too nice, but so far only alternative is to put designer dists copyClientDist outside sbt and
use bash to control when it's done - and this can lead to bugs and edge cases (release, dist/docker, dist/tgz, assembly...)
Expand Down Expand Up @@ -2025,6 +2037,7 @@ lazy val designer = (project in file("designer/server"))
"org.apache.xmlgraphics" % "fop" % "2.9" exclude ("commons-logging", "commons-logging"),
"com.beachape" %% "enumeratum-circe" % enumeratumV,
"tf.tofu" %% "derevo-circe" % "0.13.0",
"com.softwaremill.retry" %% "retry" % retryV,
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % openapiCirceYamlV,
"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % tapirV,
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV,
Expand Down Expand Up @@ -2063,25 +2076,16 @@ lazy val designer = (project in file("designer/server"))
processReports,
security,
deploymentManagerApi,
componentsApi,
restmodel,
listenerApi,
configLoaderApi,
defaultHelpers % Test,
testUtils % Test,
flinkTestUtils % Test,
componentsApi % "test->test",
// All DeploymentManager dependencies are added because they are needed to run NussknackerApp* with
// dev-application.conf. Currently, we doesn't have a separate classpath for DMs like we have for components.
// schemedKafkaComponentsUtils is added because loading the provided liteEmbeddedDeploymentManager causes
// that are also load added their test dependencies on the classpath by the Idea. It causes that
// UniversalKafkaSourceFactory is loaded from app classloader and GenericRecord which is defined in typesToExtract
// is missing from this classloader
flinkDeploymentManager % Provided,
liteEmbeddedDeploymentManager % Provided,
liteK8sDeploymentManager % Provided,
developmentTestsDeploymentManager % Provided,
flinkPeriodicDeploymentManager % Provided,
schemedKafkaComponentsUtils % Provided,
developmentTestsDeploymentManager % Test,
kafkaComponentsUtils % Test,
componentsApi % "test->test"
)

lazy val e2eTests = (project in file("e2e-tests"))
Expand Down Expand Up @@ -2286,10 +2290,10 @@ prepareDev := {
(flinkExecutor / prepareItLibs).value
val workTarget = (designer / baseDirectory).value / "work"
val artifacts =
(distribution / componentArtifacts).value ++ (distribution / devArtifacts).value ++ developmentTestsDeployManagerArtifacts.value ++
Def
.taskDyn(if (addManagerArtifacts) distribution / managerArtifacts else Def.task[List[(File, String)]](Nil))
.value ++
(distribution / componentArtifacts).value ++
(distribution / devArtifacts).value ++
developmentTestsDeployManagerArtifacts.value ++
(distribution / deploymentManagerArtifacts).value ++
(flinkExecutor / additionalBundledArtifacts).value
IO.copy(artifacts.map { case (source, target) => (source, workTarget / target) })
(designer / copyClientDist).value
Expand Down
1 change: 1 addition & 0 deletions designer/client/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
KAFKA_AUTO_OFFSET_RESET: "earliest"
SCHEMA_REGISTRY_URL: http://redpanda:8081
CONFIG_FILE: /opt/nussknacker/conf/dev-application.conf
MANAGERS_DIR: /opt/nussknacker/managers
coutoPL marked this conversation as resolved.
Show resolved Hide resolved
CONFIG_FORCE_usageStatisticsReports_enabled: "false"
CONFIG_FORCE_scenarioTypes_streaming__dev_deploymentConfig_type: stub
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package object definition {
name: String,
typ: TypingResult,
editor: ParameterEditor,
// It it used for node parameter adjustment on FE side (see ParametersUtils.ts -> adjustParameters)
// It is used for node parameter adjustment on FE side (see ParametersUtils.ts -> adjustParameters)
defaultValue: Expression,
// additionalVariables and variablesToHide are served to FE because suggestions API requires full set of variables
// and ScenarioWithDetails.json.validationResult.nodeResults is not enough
Expand Down
9 changes: 6 additions & 3 deletions designer/server/src/main/resources/defaultDesignerConfig.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#We use defaultUConfig.conf instead of reference.conf, as we don't want these properties in config loaded in model configuration
#This configuration file contains sensible designer defaults for all Nussknacker deployments, without assumptions about deployment models and external tools (grafana, flink etc.)
#All models configurations also shouldn't be in this file
# We use defaultUConfig.conf instead of reference.conf, as we don't want these properties in config loaded in model configuration
# This configuration file contains sensible designer defaults for all Nussknacker deployments, without assumptions about deployment
# models and external tools (grafana, flink etc.). All models configurations also shouldn't be in this file

managersDirs: ["./managers"]
managersDirs: [ ${?MANAGERS_DIR} ]

storageDir: ./storage
storageDir: ${?STORAGE_DIR}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cats.effect.{IO, Resource}
import com.typesafe.config.{Config, ConfigFactory, ConfigValue, ConfigValueFactory}
import org.apache.commons.io.FileUtils
import pl.touk.nussknacker.engine.{DeploymentManagerProvider, ModelData}
import pl.touk.nussknacker.ui.config.DesignerConfigLoader
import pl.touk.nussknacker.ui.config.{DesignerConfig, SimpleConfigLoadingDesignerConfigLoader}
import pl.touk.nussknacker.ui.factory.NussknackerAppFactory
import pl.touk.nussknacker.ui.process.processingtype.loader.LocalProcessingTypeDataLoader

Expand Down Expand Up @@ -49,14 +49,12 @@ object LocalNussknackerWithSingleModel {
modelData = Map(typeName -> (category, modelData)),
deploymentManagerProvider = deploymentManagerProvider
)
val designerConfigLoader = DesignerConfigLoader.fromConfig(
val designerConfig = DesignerConfig.from(
// This map is ignored but must exist
appConfig.withValue("scenarioTypes", ConfigValueFactory.fromMap(Map.empty[String, ConfigValue].asJava))
)
val appFactory = new NussknackerAppFactory(
designerConfigLoader,
_ => local
)
val designerConfigLoader = new SimpleConfigLoadingDesignerConfigLoader(designerConfig.rawConfig.resolved)
val appFactory = new NussknackerAppFactory(designerConfig, designerConfigLoader, _ => local)
appFactory.createApp()
}

Expand Down
Loading
Loading