This repository was archived by the owner on Nov 22, 2024. It is now read-only.
Runner config from the CLI#1014
Merged
Merged
Conversation
| libraryDependencies ++= Vector(JacksonScalaModule) | ||
| ) | ||
| .settings( | ||
| Compile / unmanagedSourceDirectories += (ThisProject / baseDirectory).value / ".." / ".." / "tools" / "cloudflow-runner-config" / "src" / "main" / "scala", |
Contributor
There was a problem hiding this comment.
Let's chat about tools / core again ;-)
| import cloudflow.blueprint.deployment.ApplicationDescriptorJsonFormat._ | ||
| import cloudflow.blueprint.RunnerConfigUtils._ | ||
| import cloudflow.streamlets.{ BooleanValidationType, DoubleValidationType, IntegerValidationType, StreamletExecution, StreamletLoader } | ||
| import cloudflow.runner |
Contributor
There was a problem hiding this comment.
ah I see now, rather just use cloudflow.runner... instead of runner... in code.
|
|
||
| def makeConfig: Try[Config] = Try { | ||
| val configFilePathString = Option(System.getProperty("config.file")).getOrElse(s"$ConfigMountPath/$ConfigFile") | ||
| val configFilePathString = Option(System.getProperty("config.file")).getOrElse(s"$ConfigSecretMountPath/$ConfigFile") |
Contributor
There was a problem hiding this comment.
This is slightly confusing, maybe we can chat.
| case (name, topic) => | ||
| name -> runner.config.Topic(id = topic.id, | ||
| // TODO: check with Ray the default | ||
| cluster = topic.cluster.getOrElse(""), |
| val configPath = Paths.get(configFilePathString) | ||
| val secretPath = Paths.get(s"$ConfigSecretMountPath/$SecretConfigFile") | ||
|
|
||
| val applicationConfig = if (Files.exists(configPath)) { |
Contributor
There was a problem hiding this comment.
Can you add a comment here that this is for backwards compat or extract a function called backwardsCompatConfig
| }, | ||
| portMappings = Option(deployment.portMappings).getOrElse(Map.empty).map { | ||
| case (name, pm) => | ||
| // TODO: check with Ray: cluster should be "default"? |
Contributor
There was a problem hiding this comment.
same, default is None
| @JsonProperty("id") | ||
| id: String, | ||
| @JsonProperty("cluster") | ||
| cluster: String, |
RayRoestenburg
suggested changes
Apr 8, 2021
RayRoestenburg
left a comment
Contributor
There was a problem hiding this comment.
Some changes suggested.
| case (name, pm) => | ||
| // TODO: check with Ray: cluster should be "default"? | ||
| name -> runner.config.Topic(id = pm.id, cluster = pm.cluster.getOrElse(""), config = pm.config) | ||
| name -> cloudflow.runner.config.Topic(id = pm.id, cluster = pm.cluster.getOrElse(""), config = pm.config) |
Contributor
There was a problem hiding this comment.
why still getOrElse?
9ee6edb to
296f5a9
Compare
Contributor
Author
|
should be ready to go now @RayRoestenburg |
RayRoestenburg
approved these changes
Apr 9, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the second library shared across
toolsandcoreif we start to have more we should merge back the two sbt projects.TODO: