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

Bugfix: Update lambda response processing #258

Merged
merged 3 commits into from
May 17, 2024
Merged

Conversation

ebpetway
Copy link

@ebpetway ebpetway commented Apr 29, 2024

Fixes #255

Issue: In invokeHandler , console.log was being captured to get string response from lambda invocation, but when being used for manage commands, nothing was actually getting captured by console.log, the JSON parsing of the output would fail since it was parsing an empty string, and the command would always return with 0 status code instead of a 1 as expected for failed commands.

This uses the temporary stdout override already in place to capture the return string from the lambda.

@ebpetway ebpetway changed the title Bugfix: Update lambda response processing fixes logandk/serverless-wsgi#255 Bugfix: Update lambda response processing Apr 29, 2024
@logandk
Copy link
Owner

logandk commented May 1, 2024

@ebpetway Thanks, Eric! A few of the test cases are failing after the change, do you think you could update those as well?

@ebpetway
Copy link
Author

@logandk Thanks for taking a look, tests updated!

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.18%. Comparing base (d0dca87) to head (ee23521).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #258      +/-   ##
==========================================
- Coverage   98.18%   98.18%   -0.01%     
==========================================
  Files           5        5              
  Lines         607      605       -2     
  Branches       72       72              
==========================================
- Hits          596      594       -2     
  Misses         11       11              

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

@logandk
Copy link
Owner

logandk commented May 17, 2024

Awesome, thanks @ebpetway!

@logandk logandk merged commit 7936ea6 into logandk:master May 17, 2024
5 checks passed
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.

Command fails, but shows as succeeded
2 participants