-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fixes #20437: Error when writing techniques via the technique editor #4059
Fixes #20437: Error when writing techniques via the technique editor #4059
Conversation
webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/ncf/TechniqueWriter.scala
Outdated
Show resolved
Hide resolved
PR updated with a new commit |
@@ -158,8 +183,12 @@ class RudderCRunner ( | |||
|
|||
def writeOne[T <: RuddercTarget](target: T, ruddercTargets: Set[RuddercTarget], technique: EditorTechnique, methods: Map[BundleName, GenericMethod], fallback: AgentSpecificTechniqueWriter, outputPath: String, configFilePath: String) = { | |||
if(ruddercTargets.contains(target)) { | |||
TechniqueWriterLoggerPure.debug(s"Using rudderc for target '${target.name}' for technique '${technique.path}'") *> | |||
compileForTarget[RuddercTarget.CFEngine.type](s"""${outputPath}/${technique.path}/technique.json""", configFilePath) | |||
TechniqueWriterLoggerPure.debug(s"Using rudderc for target '${target.name}' for technique '${technique.path}'") *> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need test integration from end to end to catch these things
webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/ncf/TechniqueWriter.scala
Outdated
Show resolved
Hide resolved
webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/ncf/TechniqueWriter.scala
Outdated
Show resolved
Hide resolved
webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/ncf/TechniqueWriter.scala
Outdated
Show resolved
Hide resolved
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
…/rudder/ncf/TechniqueWriter.scala Co-authored-by: Alexis Mousset <contact@amousset.me>
…/rudder/ncf/TechniqueWriter.scala Co-authored-by: Alexis Mousset <contact@amousset.me>
…/rudder/ncf/TechniqueWriter.scala Co-authored-by: Alexis Mousset <contact@amousset.me>
749e58a
to
4c3eaec
Compare
https://issues.rudder.io/issues/20437
There was (at least) three problem in previous code:
outputpath
, and it was hard to see because we duplicated much code in path creation => factor out common path in an object specific to a compiler instance, and use it to remove some boilerplate