Open noyb34 opened 1 month ago
hey, we plan to tackle the manifest issue so that hopefully you don't have to use the extra copy command - feel free to give feedback on the suggested design https://github.com/kestra-io/plugin-dbt/issues/45
@noyb34 #45 has been merged and can be tested on kestra:develop image. Would you be open to test it and let us know if it improve the workflow here :) ?
@Ben8t. Awesome. I'll do some tests and report back shortly. Thanks
Expected Behavior
The copy (cp) command within dbtCLI task should be able to copy a file in the working directory
{{ workingDir }}
to be consumed by downstream task. See example flow below.Actual Behaviour
When I run the flow, I get the following error: Unable to find
workingDir
used in the expressioncp {{workingDir}}/my_dbt_project/target/manifest.json {{workingDir}}}/manifest.json
at line 12024-10-03 16:20:06.793io.kestra.core.exceptions.IllegalVariableEvaluationException: Unable to find
workingDir
used in the expressioncp {{workingDir}}/my_dbt_project/target/manifest.json {{workingDir}}}/manifest.json
at line 1 at io.kestra.core.runners.VariableRenderer.properPebbleException(VariableRenderer.java:59) at io.kestra.core.runners.VariableRenderer.renderOnce(VariableRenderer.java:120) at io.kestra.core.runners.VariableRenderer.render(VariableRenderer.java:91) at io.kestra.core.runners.VariableRenderer.render(VariableRenderer.java:76) at io.kestra.core.runners.VariableRenderer.render(VariableRenderer.java:241) at io.kestra.core.runners.VariableRenderer.render(VariableRenderer.java:235) at io.kestra.core.runners.DefaultRunContext.render(DefaultRunContext.java:190) at io.kestra.plugin.dbt.cli.DbtCLI.run(DbtCLI.java:270) at io.kestra.plugin.dbt.cli.DbtCLI.run(DbtCLI.java:39) at io.kestra.core.runners.WorkerTaskThread.doRun(WorkerTaskThread.java:76) at io.kestra.core.runners.AbstractWorkerThread.run(AbstractWorkerThread.java:57) Caused by: io.pebbletemplates.pebble.error.RootAttributeNotFoundException: Root attribute [workingDir] does not exist or can not be accessed and strict variables is set to true. (cp {{workingDir}}/my_dbt_project/target/manifest.json {{workingDir}}}/manifest.json:1) at io.pebbletemplates.pebble.node.expression.ContextVariableExpression.evaluate(ContextVariableExpression.java:44) at io.pebbletemplates.pebble.node.PrintNode.render(PrintNode.java:37) at io.pebbletemplates.pebble.node.BodyNode.render(BodyNode.java:44) at io.pebbletemplates.pebble.node.RootNode.render(RootNode.java:31) at io.pebbletemplates.pebble.template.PebbleTemplateImpl.evaluate(PebbleTemplateImpl.java:157) at io.pebbletemplates.pebble.template.PebbleTemplateImpl.evaluate(PebbleTemplateImpl.java:96) at io.kestra.core.runners.VariableRenderer.renderOnce(VariableRenderer.java:114) ... 9 moreSteps To Reproduce
1- run the flow 2- see error
Environment Information
Example flow