-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Bug] [setValue] if "\n" in variable, then setValue function will work bad #15136
Comments
Hi @kevinkelin , according to the above logs of |
if setValue work well, there will not print any thing, but in this case, it print |
You should make sure |
I resolve this issue node_one s = "hello \n world"
print("${setValue(message=%s)}"%repr(s)) node_two echo "${message}"
echo "hi" In node_onw, python task must use so consider about how to optimize this Issue. |
You're right, actually, the cause of the issue is that we find output parameter in a single line, so in your resolution, use if (line.startsWith("${setValue(") || line.startsWith("#{setValue(")) {
varPool.append(findVarPool(line));
varPool.append("$VarPool$");
} I think we don't have to fix it, instead, we can declare more clearly in our doc, WDYT? |
I think is OK, make doc clearly, so that users can avoid this problem. |
Would you like to help enhance the doc? @kevinkelin |
OK, how to enhance the doc? |
You can submit PR to this repo, ref #15028 |
Search before asking
What happened
In python task , if a variable has "\n", then use setValue to make a Parameter for next node, the variable will not work well
node_one
node_two
check runtime log
node_one
node_two
What you expected to happen
In node_two, when
echo "${message}"
will show the Parameter set in pre task, in this case, want show “hello \n world"How to reproduce
create a workflow, the first task use python task, make a variable include "\n", then use setValue to make a Parameter
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: