Skip to content

(aws-stepfunctions): Can't add Jsonata strings to toleratedFailurePercentage #34085

Open
@NikHammon

Description

@NikHammon

Describe the bug

When trying to create a DistributedMap with a jsonata string passed in for the toleratedFailurePercentage it is not typesafe and I get a validation error saying that it must be a number that prevents me from generating the definition that I want.

I have tried uploading a jsonata string to the definition body in the aws console so I know its allowed and the doc agree.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

I would expect that I am allowed to use a jsonata variable string for the distributed map failure threshold as specified in the doc.

Current Behavior

Error: Validation failed with the following errors:
  [.../Map] toleratedFailurePercentage must be between 0 and 100

Reproduction Steps

const map = DistributedMap.jsonata(this, 'Map', {
      stateName: 'My map',
      items: ProvideItems.jsonata(...),

      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-ignore
      toleratedFailurePercentage: '{% $myThreshold %}', <<-- This causes a validation error
    })

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

^2.178.1

Framework Version

No response

Node.js Version

v20.18.2

OS

OSX

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions