Skip to content

StepFunctions: fix apigateway:invoke task parameters being dropped - #10164

Open
Smelton01 wants to merge 4 commits into
getmoto:masterfrom
Smelton01:fix-sfn-apigateway-invoke
Open

StepFunctions: fix apigateway:invoke task parameters being dropped#10164
Smelton01 wants to merge 4 commits into
getmoto:masterfrom
Smelton01:fix-sfn-apigateway-invoke

Conversation

@Smelton01

Copy link
Copy Markdown

Overview

Closes #10163

The parser-based StepFunctions implementation only accepted ApiEndpoint and Method for apigateway:invoke tasks, rejecting all other documented parameters.

This PR:

  • Accepts the optional request params Headers, Stage, Path, QueryParameters, RequestBody, AllowNullValues, and AuthType according to the docs
  • Preserves multi-value query parameters and headers instead of dropping all but the last value
  • Fixes a KeyError when the API response has no Content-Length, and a TypeError (FailureEvent missing env) that masked real task failures

Added integration tests for the success and failure paths.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (fd49aae) to head (e51bb8e).
⚠️ Report is 38 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10164      +/-   ##
==========================================
+ Coverage   93.24%   93.37%   +0.12%     
==========================================
  Files        1326     1336      +10     
  Lines      121003   121816     +813     
==========================================
+ Hits       112831   113740     +909     
+ Misses       8172     8076      -96     
Flag Coverage Δ
servertests 27.87% <0.00%> (-0.09%) ⬇️
unittests 93.34% <100.00%> (+0.12%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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: tasks with apigateway:invoke fail without issuing an HTTP request

1 participant