Step Functions: Numeric placeholder breaks rendering
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
We're using placeholder values in our ASL files which are filled in using Terraform's `templatefile` function. When opening these files in VSCode the editor is erroring with the message `Value expected asl(516)`.
This problem was raised previously https://github.com/aws/aws-toolkit-vscode/issues/1140 with a fix released in `1.11.0`
## Steps to reproduce the issue
Create a `test.asl.json` file and add the following content
```
{
"StartAt": "Test Choice",
"States": {
"Test Choice": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.config.metrics.getPaidEvent.count",
"NumericGreaterThan": ${my_placeholder},
"Next": "Done"
}
],
"Default": "Done"
},
"Done": {
"Type": "Pass",
"End": true
}
}
}
```
Observe the `Value expected` error

## Expected behavior
Using a placeholder for a numeric value doesn't error and the step function renderer works as expected
## System details (run the `AWS: About Toolkit` command)
OS: Darwin x64 22.5.0
Visual Studio Code extension host: 1.79.2
AWS Toolkit: 1.80.0
node: 16.17.1
electron: 22.5.7
Contributor guide
Research direction
Reproduce the issue in VSCode using the supplied test.asl.json content and confirm the Value expected error. Trace the Step Functions parsing or rendering path involved, then verify that a numeric placeholder no longer errors and the renderer works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- cloud, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100