-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-stepfunctions: Escaping curly braces not supported in intrinsic functions #29261
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Comments
clareliguori
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 26, 2024
github-actions
bot
added
the
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
label
Feb 26, 2024
Merged
1 task
Thanks for reporting this issue and submitting the PR! |
tim-finnigan
added
p2
effort/small
Small work item – less than a day of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 26, 2024
clareliguori
changed the title
aws-stepfunctions: Escaping curly braces not supported in States Language
aws-stepfunctions: Escaping curly braces not supported in intrinsic functions
Feb 26, 2024
mergify bot
pushed a commit
that referenced
this issue
Feb 26, 2024
… machine execution (#29267) ### Issue # (if applicable) Closes #29261 ### Reason for this change Enable proper escaping of curly braces in Step Functions intrinsic functions. The user needs to be able to explicitly escape curly braces to distinguish them from curly braces used for intrinsic function arguments (`\{\}` vs `{}`. Currently, the escaping logic double-escapes an already-escaped curly brace. The state machine successfully deploys, but then fails to execute. ### Description of changes When a backslash immediately precedes a curly brace, it will not be escaped. ### Description of how you validated changes Added a case to an existing integration test, and updated the integ test to execute the deployed state machine to check for runtime errors. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
I am trying to escape curly braces in a state machine definition, for example:
Note that the first set of curly braces in the format string are for injecting the 'Name' field, and the second set are escaped using backslashes.
Expected Behavior
The resulting definition has the curly braces properly escaped.
Current Behavior
The escaping backslash before each curly brace is doubly-escaped, leading to an error when I try to execute the state machine:
The state definition when deployed to Step Functions shows double-escaping:
Reproduction Steps
See example above
Possible Solution
The logic here incorrectly assumes all backslashes should be escaped:
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.ts#L346-L347
Additional Information/Context
No response
CDK CLI Version
2.122.0
Framework Version
No response
Node.js Version
v18.19.1
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: