8000 Step Functions: Allow JSONata Object Templates in ItemSelector Declarations by MEPalma · Pull Request #12327 · localstack/localstack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Step Functions: Allow JSONata Object Templates in ItemSelector Declarations #12327

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

Merged
merged 2 commits into from
Mar 13, 2025

Conversation

MEPalma
Copy link
Contributor
@MEPalma MEPalma commented Mar 3, 2025

Motivation

Currently, the SFN v2 interpreter does not support JSONata object templates as declaration bodies for ItemSelectors. This results in incorrect evaluation behavior, as JSONata string literals are treated as plain string literals #12315. These changes address this limitation by allowing assign object templates to be used as ItemSelector declaration bodies. This ensures the correct evaluation of ItemSelector objects when operating in both JSONPath and JSONata modes.

Changes

  • updated the parser to bind assign object templates to ItemSelector declarations
  • updated the ItemSelector evaluation component to evaluate assign object templates on the stack

Testing

  • added related positive snapshot test for the use of JSONata expressions in the object composition of ItemSelectors

@MEPalma MEPalma added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Mar 3, 2025
@MEPalma MEPalma added this to the 4.3 milestone Mar 3, 2025
@MEPalma MEPalma self-assigned this Mar 3, 2025
@MEPalma MEPalma changed the title Step Functions: Allow JSONata templates in ItemSelector Declarations Step Functions: Allow JSONata Object Templates in ItemSelector Declarations Mar 3, 2025
Copy link
github-actions bot commented Mar 3, 2025

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   32m 49s ⏱️ - 1h 19m 10s
1 452 tests  - 2 673  1 379 ✅  - 2 426  73 💤  - 247  0 ❌ ±0 
1 454 runs   - 2 673  1 379 ✅  - 2 426  75 💤  - 247  0 ❌ ±0 

Results for commit ef647a5. ± Comparison against base commit 257af99.

This pull request removes 2676 and adds 3 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.apigateway.test_apigateway_api.TestApiGatewayApiRestApi ‑ test_create_rest_api_with_binary_media_types
tests.aws.services.stepfunctions.v2.scenarios.test_base_scenarios.TestBaseScenarios ‑ test_map_state_item_selector[MAP_STATE_ITEM_SELECTOR]
tests.aws.services.stepfunctions.v2.scenarios.test_base_scenarios.TestBaseScenarios ‑ test_map_state_item_selector[MAP_STATE_ITEM_SELECTOR_JSONATA]

♻️ This comment has been updated with latest results.

Copy link
Contributor
@gregfurman gregfurman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MEPalma MEPalma merged commit 20f989b into master Mar 13, 2025
31 checks passed
@MEPalma MEPalma deleted the MEP-SFN-assign_templates_in_item_selector branch March 13, 2025 10:24
@peteroruba
Copy link

Thank you @MEPalma & @gregfurman for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0