You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 expression cp {{workingDir}}/my_dbt_project/target/manifest.json {{workingDir}}}/manifest.json at line 1
2024-10-03 16:20:06.793io.kestra.core.exceptions.IllegalVariableEvaluationException: Unable to find workingDir used in the expression cp {{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 more
Steps To Reproduce
1- run the flow
2- see error
Environment Information
Kestra Version: 0.19.1
Plugin version:
Operating System (OS / Docker / Kubernetes): Docker
noyb34
changed the title
Fix Unable to find workingDir used in the expression `cp on dbtCli task within Docker Task runner.
Fix DbtCLI task unable to work with workingDir within Docker Task runner.
Oct 8, 2024
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 #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 :) ?
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
The text was updated successfully, but these errors were encountered: