aws / aws/aws-step-functions-data-science-sdk-python
`stepfunctions.steps.states.State.output()` doesn't seem to respect result_path
- Dominant language
- Python
- Stars
- 299
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
there seems to be an issue if `stepfunctions.steps.states.State.output()` is used together with `result_path`. For example:
```
lambda_state_first = LambdaStep(
state_id="MyFirstLambdaStep",
parameters={
"FunctionName": "MakeApiCall",
"Payload": {
"input": "20192312"
}
},
result_path="$.NewOutputPath"
)
lambda_state_first.output()["Payload"].to_jsonpath()
```
I would expect that the output is `"$['NewOutputPath']['Payload']"`, but it's actually `"$['Payload']"`. Is that expected behavior and if so, how is the correct way to use `result_path` together with `output()`?
Thanks!
Contributor guide
Research direction
Start with the `State.output()` entry point and the `result_path` handling, then reproduce the issue using the `LambdaStep` example in the report. Trace how `output()["Payload"].to_jsonpath()` is assembled and verify whether the result path is applied; done means the behavior is corrected or the supported usage is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100