Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[SFN][TestState] Make roleArn optional#13459

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tiurin merged 7 commits intomainfromsfn/feat/test-state-optional-role
Dec 3, 2025

Conversation

@tiurin
Copy link
Contributor

Motivation

roleArn is now only required when tested state is Task and a mock is not provided.

Closes DRG-238.

Changes

Add validation forroleArn presence.
Add workaround forroleArn being not optional in Execution hierarchy.
Remove roleArn from tests where it is not needed - much faster execution agaisnt AWS with only necessary fields provided. Snapshot recording hasn't changed.

Tests

Related

Test passes just fine as roleArn became optional.Also, test runs way faster against AWS now because the majority of time was spent in role creation.
Hack to check if basic test state scenario works well in LocalStack without a real role.Pending comment about a hack and a validation for states where dummy role cannot be used.
When state is Task and mock is not supplied
Faster execution with only necessary fields provided. Snapshot recording hasn't changed.
@tiurintiurin added aws:stepfunctionsAWS Step Functions semver: patchNon-breaking changes which can be included in patch releases docs: skipPull request does not require documentation changes notes: skipPull request does not have to be mentioned in the release notes labelsDec 3, 2025
sfn_snapshot.match("test_case_response",test_case_response)

@markers.aws.validated
deftest_base_lambda_service_task_state_no_role_arn_validation(
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Test for the case whenroleArn is actually needed.

@github-actions
Copy link

Test Results - Preflight, Unit

22 889 tests  ±0   21 075 ✅ ±0   6m 57s ⏱️ +52s
     1 suites ±0    1 814 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit9760b97. ± Comparison against base commit049201f.

@github-actions
Copy link

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   22m 32s ⏱️ - 1h 40m 51s
1 703 tests  - 3 400  1 614 ✅  - 3 097  89 💤  - 303  0 ❌ ±0 
1 705 runs   - 3 400  1 614 ✅  - 3 097  91 💤  - 303  0 ❌ ±0 

Results for commit9760b97. ± Comparison against base commit049201f.

This pull requestremoves 3401 andadds 1 tests.Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodbtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crudtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_bookstests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setuptests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_snstests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infratests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_tabletests.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_state.test_test_state_scenarios.TestStateCaseScenarios ‑ test_base_lambda_service_task_state_no_role_arn_validation

@github-actions
Copy link

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 22s ⏱️ ±0s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit9760b97. ± Comparison against base commit049201f.

@github-actions
Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   39m 10s ⏱️
1 727 tests 1 639 ✅ 88 💤 0 ❌
1 733 runs  1 639 ✅ 94 💤 0 ❌

Results for commit9760b97.

@tiurintiurin added the review: merge when readySignals to the reviewer that a PR can be merged if accepted labelDec 3, 2025
Copy link
Contributor

@gregfurmangregfurman left a comment

Choose a reason for hiding this comment

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

Looks fine to unblock us 👍

tiurin reacted with heart emoji
arn=stepfunctions_state_machine_arn(
name=name,account_id=context.account_id,region_name=context.region
)
role_arn=request.get("roleArn")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know if theroleArn param requires any special validations?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I plan to investigate it later, also noticed the lack of validation.

@tiurintiurin merged commit84bdd4a intomainDec 3, 2025
63 checks passed
@tiurintiurin deleted the sfn/feat/test-state-optional-role branchDecember 3, 2025 12:14
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gregfurmangregfurmangregfurman approved these changes

Assignees

@gregfurmangregfurman

Labels

aws:stepfunctionsAWS Step Functionsdocs: skipPull request does not require documentation changesnotes: skipPull request does not have to be mentioned in the release notesreview: merge when readySignals to the reviewer that a PR can be merged if acceptedsemver: patchNon-breaking changes which can be included in patch releases

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@tiurin@gregfurman

[8]ページ先頭

©2009-2025 Movatter.jp