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

bug: StepFunctions: SecondsPath in Wait state throws error #10505

Closed
1 task done
rajveerappan opened this issue Mar 20, 2024 · 1 comment · Fixed by #10521
Closed
1 task done

bug: StepFunctions: SecondsPath in Wait state throws error #10505

rajveerappan opened this issue Mar 20, 2024 · 1 comment · Fixed by #10521
Assignees
Labels
aws:stepfunctions AWS Step Functions status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@rajveerappan
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Using a SecondsPath with a Wait state in a step function definition makes the execution fail with the following error in the logs even though a valid input is provided:

localstack_main  | 2024-03-20T21:16:50.021 ERROR --- [d-196 (eval)] l.s.s.a.c.eval_component   : Exception=TypeError, Details=["'>' not supported between instances of 'list' and 'int'"] at '(SecondsPath| {'path': '$.input.waitSeconds'}'
localstack_main  | 2024-03-20T21:16:50.021 ERROR --- [d-196 (eval)] l.s.s.a.c.eval_component   : Exception=TypeError, Details=["'>' not supported between instances of 'list' and 'int'"] at '(StateWait| {'comment': None, 'input_path': (InputPath| {'input_path_src': '$'}, 'output_path': (OutputPath| {'output_path': '$'}, 'state_entered_event_type': 'WaitStateEntered', 'state_exited_event_type': 'WaitStateExited', 'name': 'Wait', 'state_type': <StateType.Wait: 21>, 'continue_with': <localstack.services.stepfunctions.asl.component.state.state_continue_with.ContinueWithEnd object at 0xfffe90d8e390>, 'wait_function': (SecondsPath| {'path': '$.input.waitSeconds'}}'
localstack_main  | 2024-03-20T21:16:50.022 ERROR --- [d-196 (eval)] l.s.s.a.c.program.program  : Stepfunctions computation ended with exception 'TypeError('>' not supported between instances of 'list' and 'int')'.

The same step function definition and input work in AWS.

Expected Behavior

The Wait state should take the value from the location specified in SecondsPath and wait for that duration as described in the AWS docs

SecondsPath
A time, in seconds, to wait before beginning the state specified in the Next field, specified using a path from the state's input data.

You must specify an integer value for this field.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker-compose up

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

Create a state machine using either awslocal or the localstack resource browser with the following ASL definition:

{
  "Comment": "Dynamic wait seconds path",
  "StartAt": "Wait",
  "States": {
    "Wait": {
      "Type": "Wait",
      "End": true,
      "SecondsPath": "$.input.waitSeconds"
    }
  }
}

Start an execution of the state machine using either awslocal or the localstack resource browser with the following input:

{
  "input": {
    "waitSeconds": 60
  }
}

The execution fails immediately in LocalStack whereas in AWS the execution proceeds and waits for 60 seconds as expected before completing.

Environment

- OS: macOS 14.1.1
- LocalStack: 3.2.0

Anything else?

No response

@rajveerappan rajveerappan added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Mar 20, 2024
@localstack-bot
Copy link
Collaborator

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our contributing guide.

@MEPalma MEPalma self-assigned this Mar 21, 2024
@MarcelStranak MarcelStranak added aws:stepfunctions AWS Step Functions status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:stepfunctions AWS Step Functions status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants