(stepfunctions): itemSelector keys with null value are omitted #29549
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
when configuring a Map state, the key with null value is omitted from the input data passed to the item processor
I am confused if this is intended or not
On the one hand
sfn.Condition.is_null(...)
exists, so it seems intended to be possible to deal with keys having null values?On the other hand the "Data flow simulator" tool returns an error (
No results for path: '[object Object]'
) if key has a null value:unclear if that means it's not supported or it's just a bug in the simulator
it is quite a common issue in JSON de/serializer code that the case of "key present but value is null" is conflated with "key not present" and null keys are omitted by default
however if it's not possible to pass keys with null values this complicates things in Step Functions particularly because many of the various methods with JSONPath args will error if the key is not present
leaving only the less satisfactory option of using some not-null value to mean null
Expected Behavior
all explicitly specified keys are propagated to the input
Current Behavior
keys with null value are omitted
Reproduction Steps
see above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.133.0 (build dcc1e75)
Framework Version
No response
Node.js Version
v18.18.0
OS
macOS 14.3.1
Language
Python
Language Version
3.11.5
Other information
No response
The text was updated successfully, but these errors were encountered: