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

Integer types raise validation errors for Amazon State Languages files (DefinitionSubstitutions in step functions) #6668

Open
basvandriel opened this issue Feb 25, 2025 · 0 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. partner-team Triggers issue routing to owner team stepfunctions

Comments

@basvandriel
Copy link

Problem

As per the documentation on DefineSubstitutions, variables should be formatted as ${variableName}. When doing this for integers, the editor raises validation errors. For example, when defining a retrying block for one of the step function states, the MaxAttempts key needs an integer.

"Retry": [
  {
      "ErrorEquals": [
          "States.TaskFailed"
      ],
      "IntervalSeconds": 300,
      "MaxAttempts": ${MaxAttempts},
      "BackoffRate": 1
  }
],

This will then two errors:

[{
	"resource": "/Users/bas/code/sample-project/state-machine.asl.json",
	"owner": "_generated_diagnostic_collection_name_#3",
	"code": "516",
	"severity": 8,
	"message": "Value expected",
	"source": "asl",
	"startLineNumber": 15,
	"startColumn": 30,
	"endLineNumber": 15,
	"endColumn": 31
},{
	"resource": "/Users/bas/code/sample-project/state-machine.asl.json",
	"owner": "_generated_diagnostic_collection_name_#3",
	"severity": 8,
	"message": "Incorrect type. Expected \"object\".",
	"startLineNumber": 16,
	"startColumn": 15,
	"endLineNumber": 16,
	"endColumn": 28
}]

Steps to reproduce the issue

Use the example provided in the problem. This will then raise the validation errors.

Expected behavior

The validation errors not being shown.

System details (run AWS: About and/or Amazon Q: About)

  • OS: MacOS 15.1.1 (24B91)
  • Visual Studio Code version: 1.97.2
  • AWS Toolkit version: 3.47.0
  • Amazon Q version:
@basvandriel basvandriel added the bug We can reproduce the issue and confirmed it is a bug. label Feb 25, 2025
@justinmk3 justinmk3 added stepfunctions partner-team Triggers issue routing to owner team labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. partner-team Triggers issue routing to owner team stepfunctions
Projects
None yet
Development

No branches or pull requests

2 participants