takemikami / digdag-plugin-shresult Goto Github PK
View Code? Open in Web Editor NEWdigdag-sh-result-store is plugin storing output of shell to digdag store.
License: MIT License
digdag-sh-result-store is plugin storing output of shell to digdag store.
License: MIT License
I have a question about using digdag-plugin-shresult.
In a .dig file, I have the following configuration:
_export:
plugin:
repositories:
- https://jitpack.io/
dependencies:
- com.github.takemikami:digdag-plugin-shresult:0.0.3
+find_dirs:
sh_result>: |
find ./ -maxdepth 1 -type d -exec basename {} \; | grep -v "^.$" | grep -E '^\[' | sort -u | tr '\n' ',' | sed 's/,$//'
destination_variable: dirs
stdout_format: text
+call_dig:
for_each>:
dir: "${dirs.split(',')}"
_parallel: true
_do:
+loop_dig:
call>: ${dir}/unload.dig
In the ‘+find_dirs’ task, I’m attempting to extract directory names that start with ‘[’ and store them in the ‘dirs’ variable. However, during Digdag execution, there are instances where items other than directory names starting with ‘[’ are being stored in ‘dirs’.
Is this potentially a bug in plugin? I would appreciate your confirmation.
Here are the ‘dirs’ values that I want to extract and the ‘dirs’ values that were mistakenly extracted in this operation:
Desired ‘dirs’:
dirs: [foo1]bar1,[foo2]bar2,[foo3]bar3,[foo4]bar4
‘Dirs’ extracted in the current operation (Example 1: Code from the executed workflow’s .dig file is being extracted):
dirs: >+
2023-09-14 21:45:48 +0000 [INFO] (1913@[0:test_wf]+test_coordinator+call_dig^sub^sub+find_dirs) io.digdag.core.agent.OperatorManager: sh_result>: find ./ -maxdepth 1 -type d -exec basename {} \; | grep -v "^.$" | grep -E '^\[' | sort -u | tr '\n' ',' | sed 's/,$//'
‘Dirs’ extracted in the current operation (Example 2: Logs from other projects executed at the same time are being extracted):
dirs: >-
2023-09-07 09:15:02 +0000 [INFO] (5117@[0:cost_alert]+cost_change+scripts+notice) io.digdag.core.agent.OperatorManager: sh>: cd cost_alert python3 [main.py](http://main.py/) -t increase [foo1]bar1,[foo2]bar2,[foo3]bar3,[foo4]bar4
digdag: 0.10.4
macOS: 12.6
Thank you for the plugin.
CommandExecutor.start()
have been abolished (commit diff).2021-02-15 02:53:26.732 +0000 [INFO] (0363@[0:test2]+file_check+task) io.digdag.core.agent.OperatorManager: sh_result>: ls /tmp
2021-02-15 02:53:26.809 +0000 [ERROR] (0363@[0:test2]+file_check+task) io.digdag.core.agent.OperatorManager: Task failed with unexpected error: io.digdag.spi.CommandExecutor.start(Ljava/nio/file/Path;Lio/digdag/spi/TaskRequest;Ljava/lang/ProcessBuilder;)Ljava/lang/Process;
java.lang.NoSuchMethodError: io.digdag.spi.CommandExecutor.start(Ljava/nio/file/Path;Lio/digdag/spi/TaskRequest;Ljava/lang/ProcessBuilder;)Ljava/lang/Process;
at com.takemikami.github.digdag.plugin.shresult.ShResultOperatorFactory$ShResultOperator.runTask(ShResultOperatorFactory.java:103)
at io.digdag.util.BaseOperator.run(BaseOperator.java:35)
at io.digdag.core.agent.OperatorManager.callExecutor(OperatorManager.java:365)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invokeMain(DigdagTimedMethodInterceptor.java:58)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invoke(DigdagTimedMethodInterceptor.java:31)
at io.digdag.core.agent.OperatorManager.runWithWorkspace(OperatorManager.java:298)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invokeMain(DigdagTimedMethodInterceptor.java:58)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invoke(DigdagTimedMethodInterceptor.java:31)
at io.digdag.core.agent.OperatorManager.lambda$runWithHeartbeat$2(OperatorManager.java:151)
at io.digdag.core.agent.ExtractArchiveWorkspaceManager.withExtractedArchive(ExtractArchiveWorkspaceManager.java:77)
at io.digdag.core.agent.OperatorManager.runWithHeartbeat(OperatorManager.java:149)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invokeMain(DigdagTimedMethodInterceptor.java:58)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invoke(DigdagTimedMethodInterceptor.java:31)
at io.digdag.core.agent.OperatorManager.run(OperatorManager.java:132)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invokeMain(DigdagTimedMethodInterceptor.java:58)
at io.digdag.server.metrics.DigdagTimedMethodInterceptor.invoke(DigdagTimedMethodInterceptor.java:31)
at io.digdag.core.agent.MultiThreadAgent.lambda$null$0(MultiThreadAgent.java:132)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
CommandExecutor.start()
to CommandExecutor.run()
On digdag server v0.10.0, execute RUN
after registering the following workflow.
timezone: Asia/Tokyo
_export:
workflow_name: file_check
plugin:
repositories:
- https://jitpack.io
dependencies:
- com.github.takemikami:digdag-plugin-shresult:0.0.2
+task:
sh_result>: ls /tmp
destination_variable: files
stdout_format: text
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.