[Bug]: the parameter is not passed if it is in the list but not set
Apache Hop version?
2.4
Java version?
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Uos-1deb10u2, mixed mode, sharing)
Operating system
Linux
What happened?
In the "pipeline" action listing the parameter without setting it does not pass it to the sub pipeline. It happens if a parameter is defined and set in a main wf, it is defined in the called pl, in the action "pipeline" the action "Pass the parameter value to the secondary pipeline" is selected, and the parameter is listed but not set test_parameter.zip
Issue Priority
Priority: 2
Issue Component
Component: Actions
I am seeing this also in 2.4...no issue in 2.3
.take-issue
I see what's happening, and I'm inclined to fix it. But honestly I think getting an empty input_parameter is actually the correct result... Either you remove the parameter form the pipeline action or you pass the value. You are passing an empty value which I would consider bad practice. it just "happened" to work
@hansva - in my case, there shouldn't be an empty value
I can run the same workflow in 2.3 and it works...in 2.4, the parameters are not passed in at all.
Hi @hansva. I also think getting an empty input_parameter is actually the "correct" result, as happens if I put a "static" value, but the behavior has changed since 2.3 and that's my concern.
I think there is a difference in putting in a static parameter vs. empty parameter. That should be an error IMO. @enricomariam42 - there are some bugs that have been cleaned up along the way that highlighted improper workflow design that should have been not allowed in the first place. One of the biggest challenges in cleaning up a platform is some things may appeared to have worked before, but shouldn't have in the first place. I think our goal is to make sure the user knows what to expect when they have things set up properly. I too have been bitten by these bugs from the past, but have cleaned up my workflows to provide a clearer picture to whomever may be working on the workflow/pipeline in the future.
~~For me an empty parameter is a valid 'null' value: eg to clear a preset value.~~ It is not possible to pass a null value to clear the default one. I made a more complete example with multiple cases with either empty or preset parameters in the called pipeline, the first call with "pass parameters" and the second without. _1: left empty _2: static value _3: not listed
The same thing with a "pipeline executor" gives different results.
I think the expected behavior is the 2.4 ones. Then the "pipeline executor" need a fix to match with the "pipeline" call. test_parameter.zip
Thanks for the further investigation @enricomariam42 ! We have quite an extensive list of tests for variables/parameters which can be found here. I think we will have to expand it to lock down these cases and make a stance on how they have to work.