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

[SFN] Enhancements to api actions validations: InvalidArn, StateMachineDoesNotExist, ExecutionDoesNotExist #10421

Merged
merged 2 commits into from Mar 11, 2024

Conversation

MEPalma
Copy link
Contributor

@MEPalma MEPalma commented Mar 8, 2024

Motivation

This PR enhances the detection of irregularities in api action requests concerning the arns given. Specifically, it improves the throwing of InvalidArn, StateMachineDoesNotExist, ExecutionDoesNotExist, ExecutionDoesNotExist errors. It also adds relative negative tests, and positive tests were missing.
Closes: #10382

Changes

  • Detection of Invalid StateMachine Arns
  • Detection of Invalid StateMachine Execution Arns
  • Improved message body of errors: InvalidArn, StateMachineDoesNotExist, ExecutionDoesNotExist
  • Added Arn validation in DescribeStateMachine, DescribeStateMachineForExecution, StartExecution, DescribeExecution, GetExecutionHistory, DeleteStateMachine, DeleteStateMachineVersion, StopExecution
  • Added Arn validation and StateMachine existence check in ListExecutions, ListStateMachineVersions(see InvalidArn behaviour difference), UpdateStateMachine, PublishStateMachineVersion

@MEPalma MEPalma added the semver: patch Non-breaking changes which can be included in patch releases label Mar 8, 2024
@MEPalma MEPalma added this to the 3.3 milestone Mar 8, 2024
@MEPalma MEPalma self-assigned this Mar 8, 2024
@MEPalma MEPalma changed the title [SFN] Enhancements to api actions validations: InvalidArn, StateMachineDoesNotExist, ExecutionDoesNotExist, ExecutionDoesNotExist [SFN] Enhancements to api actions validations: InvalidArn, StateMachineDoesNotExist, ExecutionDoesNotExist Mar 8, 2024
Copy link

github-actions bot commented Mar 8, 2024

LocalStack Community integration with Pro

    2 files      2 suites   1h 26m 47s ⏱️
2 704 tests 2 447 ✅ 257 💤 0 ❌
2 706 runs  2 447 ✅ 259 💤 0 ❌

Results for commit d442ac6.

@coveralls
Copy link

coveralls commented Mar 8, 2024

Coverage Status

coverage: 85.666% (-0.002%) from 85.668%
when pulling a6306f5 on MEP-sfn-api_arn_validations
into aa664cb on master.

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.

LGTM, thanks for fixing this. Gonna be a lot easier now to figure out why the execution failed 😄

localstack/services/stepfunctions/provider.py Outdated Show resolved Hide resolved
@MEPalma MEPalma merged commit 9d1cbd5 into master Mar 11, 2024
10 of 11 checks passed
@MEPalma MEPalma deleted the MEP-sfn-api_arn_validations branch March 11, 2024 19:48
@thrau thrau added the aws:stepfunctions AWS Step Functions label Mar 18, 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 semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
4 participants