8000 [SFN] Base Support for ValidateStateMachineDefinition by MEPalma · Pull Request #11660 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

[SFN] Base Support for ValidateStateMachineDefinition #11660

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 3 commits into from
Oct 16, 2024

Conversation

MEPalma
Copy link
Contributor
@MEPalma MEPalma commented Oct 9, 2024

Motivation

Upgrading to the latest Terraform AWS provider is currently not possible because the Step Functions v2 provider lacks support for the ValidateStateMachineDefinition API action. This pull request introduces basic support for this API action, reporting any currently detectable issues (for STANDARD and EXPRESS) in the diagnostics field and reflecting the validation outcome in the result field. Addresses: #11553

Changes

  • Added base support for ValidateStateMachineDefinition in the v2 provider
  • Added base positive and negative snapshot tests (here I intentionally used simple pytest parametrisation to ease selective testing as done in other suites for the SFN provider)

@MEPalma MEPalma added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Oct 9, 2024
@MEPalma MEPalma added this to the 4.0 milestone Oct 9, 2024
@MEPalma MEPalma self-assigned this Oct 9, 2024
Copy link
github-actions bot commented Oct 9, 2024

LocalStack Community integration with Pro

    2 files  ±    0    2 suites  ±0   29m 32s ⏱️ - 1h 11m 1s
1 057 tests  - 2 440  899 ✅  - 2 185  158 💤  - 255  0 ❌ ±0 
1 059 runs   - 2 440  899 ✅  - 2 185  160 💤  - 255  0 ❌ ±0 

Results for commit 253f3af. ± Comparison against base commit 7875b83.

This pull request removes 2448 and adds 8 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.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_not_a_definition[EMPTY_DICT]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_not_a_definition[EMPTY_STRING]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_not_a_definition[NOT_A_DEF]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_type_express[ILLEGAL_WFTT]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_type_express[INVALID_BASE_NO_STARTAT]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_type_express[VALID_BASE_PASS]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_type_standard[INVALID_BASE_NO_STARTAT]
tests.aws.services.stepfunctions.v2.test_sfn_api_validation.TestSfnApiValidation ‑ test_validate_state_machine_definition_type_standard[VALID_BASE_PASS]

♻️ This comment has been updated with latest results.

Copy link
Member
@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

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

Thanks for immediately jumping on this and implementing basic support here. Definitely an area that will be interesting to see growing and aligning our validation with that done by AWS. 👍


@markers.snapshot.skip_snapshot_verify(
paths=[
"$..tracingConfiguration",
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason for this here? I didn't see that key anywhere in the recorded snapshots below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can indeed be removed, thanks!

@MEPalma MEPalma merged commit 6b8003d into master Oct 16, 2024
34 checks passed
@MEPalma MEPalma deleted the MEP-sfn-base_validateStateMachineDefinition branch October 16, 2024 11:42
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.

2 participants
0