aws / aws/aws-toolkit-vscode

Step Functions: Numeric placeholder breaks rendering

Open
#3,646 0 comments 4 reactions 0 assignees View on GitHub
bug partner-team stepfunctions
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
![image](https://github.com/aws/aws-toolkit-vscode/assets/5383225/8cf43348-0d5c-4983-8f21-d737e842b50e)

## 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.