These have been skipped for a while now because they didn't work
correctly. The old tests have been scrapped in favor of new ones that
test both the old and new config schema.
There are 4 types of reactor jobs, and 3 different config schemas for
passing arguments:
1. local - positional and keyword args passed in arg/kwarg params,
respectively.
2. runner/wheel - passed as individual params directly under the
function name.
3. caller - only positional args supported, passed under an "args"
param.
In addition to being wildly inconsistent, there are several problems
with each of the above approaches:
- For local jobs, having to know which are positional and keyword
arguments is not user-friendly.
- For runner/wheel jobs, the fact that the arguments are all passed in
the level directly below the function name means that they are dumped
directly into the low chunk. This means that if any arguments are
passed which conflict with the reserved keywords in the low chunk
(name, order, etc.), they will override their counterparts in the low
chunk, which may make the Reactor behave unpredictably.
To solve these issues, this commit makes the following changes:
1. A new, unified configuration schema has been added, so that arguments
are passed identically across all types of reactions. In this new
schema, all arguments are passed as named arguments underneath an
"args" parameter. Those named arguments are then passed as keyword
arguments to the desired function. This works even for positional
arguments because Python will automagically pass a keyword argument
as its positional counterpart when the name of a positional argument
is found in the kwargs.
2. The caller jobs now support both positional and keyword arguments.
Backward-compatibility with the old configuration schema has been
preserved, so old Reactor SLS files do not break. In addition, you've
probably already said to yourself "Hey, caller jobs were _already_
passing their arguments under an "args" param. What gives?" Well, using
the old config schema, only positional arguments were supported. So if
we detect a list of positional arguments, we treat the input as
positional arguments (i.e. old schema), while if the input is a
dictionary (or "dictlist"), we treat the input as kwargs (i.e. new
schema).
PR #38168 was merged but some of the merged logic was subseqently lost.
Add back the lost logic so that the feature may work again.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>