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
[stepfunctions] CustomState loses explicit null fields from parsed JSON #8754
Comments
@erik-telesoftas are you able to use the special value |
Using It creates
|
I'm seeing the same behavior if I pull in a custom state machine json (rendered by SAM). The node tree passed to |
Same issue on following environment: Looks like this issue in SFN Data Science SDK: aws/aws-step-functions-data-science-sdk-python#45 |
Also experiencing this issue, specifically when using service integrations: |
Same issue. CDK Version: 2.31.1 |
Any updates on this issue? |
Bump Not seeing any progress on this in 3 years and still having the issue. Also not seeing a lot of updates for Step Functions in general in CDK. You guys still working on this at all or should I be looking for a different deployment tool for my workflows? |
@ANHPearce Can you post your code that is not working? Both using import * as cdk from 'aws-cdk-lib/core';
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'StepFunctionsNullStack', {
env: { region: 'eu-west-1' }
});
const customA = new sfn.CustomState(stack, "JsonPath.DISCARD", {
stateJson: {
Type: "Task",
Resource:
"arn:aws:states:::elasticmapreduce:setClusterTerminationProtection",
Parameters: {
"ClusterId.$": "$.ClusterId",
TerminationProtected: true,
},
ResultPath: sfn.JsonPath.DISCARD,
Next: "rollup",
},
});
const customB = new sfn.CustomState(stack, "null", {
stateJson: {
Type: "Task",
Resource:
"arn:aws:states:::elasticmapreduce:setClusterTerminationProtection",
Parameters: {
"ClusterId.$": "$.ClusterId",
TerminationProtected: true,
},
ResultPath: null,
Next: "rollup",
},
});
new sfn.StateMachine(stack, "StateMachine", {
definition: sfn.Chain.start(customA).next(customB),
}); StateMachine2E01A3A5:
Type: AWS::StepFunctions::StateMachine
Properties:
DefinitionString: '{"StartAt":"JsonPath.DISCARD","States":{"JsonPath.DISCARD":{"Next":"rollup","Type":"Task","Resource":"arn:aws:states:::elasticmapreduce:setClusterTerminationProtection","Parameters":{"ClusterId.$":"$.ClusterId","TerminationProtected":true},"ResultPath":null},"null":{"End":true,"Type":"Task","Resource":"arn:aws:states:::elasticmapreduce:setClusterTerminationProtection","Parameters":{"ClusterId.$":"$.ClusterId","TerminationProtected":true},"ResultPath":null,"Next":"rollup"}}}'
RoleArn:
Fn::GetAtt:
- StateMachineRoleB840431D
- Arn
DependsOn:
- StateMachineRoleB840431D |
Closing this for now. As far as I can tell this has been fixed in #24593. If you still encounter this issue, please create a NEW issue, but feel free to reference this one. |
|
CustomState https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-stepfunctions.CustomState.html
looses explicit
null
fields from parsed JSON.Reproduction Steps
JSON provided bellow
generates next output parsed as CustomStep and added to the flow
"ResultPath": null is missing in the result
Environment
Other
Worarround for this particular case is to provide any fake result part, which is not null e.g.
$.devnull
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: