Skip to content
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

Local Script is not working when using tmp folder with a threadcount > 1 #23

Open
claudekenni opened this issue Aug 26, 2024 · 0 comments

Comments

@claudekenni
Copy link

Hello,

the local-script plugin has an issue where when using tmpfolder together with a Job that is running parallel with a threadcount higher than 1, it will create the same filename script-$executionid.sh for each execution and as soon as the first one is done, the file is deleted and then the subsequent step either fail running or fail when trying to remove the already deleted file.

if [ -z "${RD_CONFIG_TMP:-}" ]; then
scriptfile=$(mktemp -t "script.in.XXXX")
else
tmp_folder="${RD_CONFIG_TMP:-}"
mkdir -p "$tmp_folder"
scriptfile="$tmp_folder/script-$RD_JOB_EXECID"
fi

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@claudekenni and others