Skip to content
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

fix(aws-stepfunctions, aws-stepfunctions-tasks): missing suffix ".$" in field names of reference paths #2937

Closed
wqzoww opened this issue Jun 19, 2019 · 0 comments · Fixed by #2939 or MechanicalRock/tech-radar#14 · May be fixed by MechanicalRock/cdk-constructs#5, MechanicalRock/cdk-constructs#6 or MechanicalRock/cdk-constructs#7
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@wqzoww
Copy link
Contributor

wqzoww commented Jun 19, 2019

Describe the bug
The suffix ".$" is missing in the field "token" whose value is a reference path "$$.Task.Token" in the following unit test:
https://github.com/awslabs/aws-cdk/blob/ea10f0d141a48819ec0000cd7905feda993870a9/packages/%40aws-cdk/aws-stepfunctions-tasks/test/invoke-function.test.ts#L78
Users can create their state machine with such definition but runtime exception will be thrown because of the missing suffix when they start any execution.

Expected behavior
All the fields with reference paths in the state machine definition should end with ".$".
The payload field should look like:

"Payload": {
    "token.$": "$$.Task.Token"
}

Reference
https://states-language.net/spec.html

Version:

@wqzoww wqzoww added the bug This issue is a bug. label Jun 19, 2019
@wqzoww wqzoww changed the title fix(aws-stepfunctions, aws-stepfunctions-tasks): Missing suffix ".$" in field names of reference paths fix(aws-stepfunctions, aws-stepfunctions-tasks): missing suffix ".$" in field names of reference paths Jun 19, 2019
wqzoww added a commit to wqzoww/aws-cdk that referenced this issue Jun 19, 2019
…eld names of reference paths

* add suffix ".$" for the fields whose values are reference paths, including json path and context object
* fix unit tests and integration test for lambda task

issue: aws#2937
wqzoww added a commit to wqzoww/aws-cdk that referenced this issue Jun 19, 2019
…eld names of reference paths

* add suffix ".$" for the fields whose values are reference paths, including json path and context object
* fix unit tests and integration test for lambda task

fixes aws#2937
@NGL321 NGL321 added the needs-triage This issue or PR still needs to be triaged. label Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment