-
Notifications
You must be signed in to change notification settings - Fork 129
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
Unable to run arbitrary code snippets using the "script" directive #510
Comments
Thanks for your answer! |
Thanks for letting me know!
So, I think one possible cause could be the |
Yohamta, I don't think the issue is related to the interpreter or any other command (I've tried many combination of bash/zsh or any command): in fact, since I use the "script" directive I've got this error (the "command" directive works fine unitarily). Is there any chance that the temp file may be deleted before being executed? The detail of my environment follows:DEBIAN: BASH: Running a sample bash script from the hostSample script
dagu@dagu$ bash test.sh dagu@dagu$ bash | echo test Can you lead me to the part of the code handling that temp file creation ? I'm not pretty familiar with Go... Regards, |
After further investigations, this seems to be related to permissions on my environment. When I force the working dir on the DAG's step (e.g. /tmp), the task is perfectly executed: As I can see in the repository, the module in charge of generating the tempfile is "internal/schedule/node" and expecially the function "setupScript". Maybe it will be a good idea to add/perform addtional checks on the generated temporary file? I'll invetigate further to identify those permissions issues. Regards, |
Hi Oliver, thanks for your thorough investigation and the great suggestion! You're right about the "internal/schedule/node", it is responsible for creating a tempfile.
I agree, it seems definitely better and we can make the error message to be more user-friendly. |
Hello,
I'm unable to run arbitrary code snippets using the "script" directive.
Sample (simple) DAG:
Encountered error (whatever shell or other command is declared in "command"):
+---+--------+---------------------+---------------------+--------+---------+------------------+
| # | STEP | STARTED AT | FINISHED AT | STATUS | COMMAND | ERROR |
+---+--------+---------------------+---------------------+--------+---------+------------------+
| 1 | step 1 | 2023-12-30 15:07:44 | 2023-12-30 15:07:44 | failed | bash | invalid argument |
+---+--------+---------------------+---------------------+--------+---------+------------------+
Any clue of what's going wrong?
Thanks,
Oliver
The text was updated successfully, but these errors were encountered: