Skip to content

StepFunctions: start_execution() is only idempotent for running Execu…#9500

Merged
bblommers merged 1 commit intogetmoto:masterfrom
bblommers:sfn-idempotency-finished-executions
Nov 27, 2025
Merged

StepFunctions: start_execution() is only idempotent for running Execu…#9500
bblommers merged 1 commit intogetmoto:masterfrom
bblommers:sfn-idempotency-finished-executions

Conversation

@bblommers
Copy link
Collaborator

Motivation

Followup to #9397. The start_execution is idempotent, but only for running executions. If an execution has finished running (either success or failure), restarting the same execution should still fail.

This PR also adds idempotency to the start_execution() method when using the StepFunctions Parser, with AWS-validated tests to verify that this now works as expected.

FYI @chriselion, as you raised the original PR: I believe this change is correct, but please let me know if I've missed anything!

@bblommers bblommers added this to the 5.1.18 milestone Nov 25, 2025
@bblommers bblommers linked an issue Nov 25, 2025 that may be closed by this pull request
@bblommers bblommers force-pushed the sfn-idempotency-finished-executions branch from bddd918 to a623c6f Compare November 25, 2025 21:57
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.04%. Comparing base (3d3e685) to head (a623c6f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9500   +/-   ##
=======================================
  Coverage   93.04%   93.04%           
=======================================
  Files        1301     1301           
  Lines      116784   116787    +3     
=======================================
+ Hits       108660   108664    +4     
+ Misses       8124     8123    -1     
Flag Coverage Δ
servertests 28.90% <0.00%> (-0.01%) ⬇️
unittests 93.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bblommers bblommers marked this pull request as ready for review November 26, 2025 20:32
@chriselion
Copy link
Contributor

Sounds reasonable to me !

@bblommers bblommers merged commit a30c18a into getmoto:master Nov 27, 2025
123 of 124 checks passed
@bblommers bblommers deleted the sfn-idempotency-finished-executions branch November 27, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[StepFunctions] Start Execution ExecutionAlreadyExists error

2 participants