fix(testing): handle workflow failure states correctly - #682
Conversation
f4129a2 to
b6a604a
Compare
b6a604a to
861756a
Compare
861756a to
09acaf6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
yaythomas
left a comment
There was a problem hiding this comment.
Very nice, thank you! just some nits.
This comment has been minimized.
This comment has been minimized.
| if execution.status == "FAILED": | ||
| logger.warning("Execution failed") | ||
| return execution | ||
| if execution.status in ["TIMED_OUT", "ABORTED"]: |
There was a problem hiding this comment.
I do not think "ABORTED" is a valid execution status. Could not find any references to it in other SDKs. The API documentation also does not list "ABORTED" as being a valid execution status.
I think it should instead be "STOPPED", as that specific status is not covered in this function.
I noticed this when implementing a new "execution_status" field on the test result class and my AI coding agent flagged this to me.
Codex AI reviewNo actionable findings. Residual risk is limited to runtime validation because tests were not executed under the review constraints. Reviewed commit |
yaythomas
left a comment
There was a problem hiding this comment.
![]()
friendly reminder to squash at merge with a conventional-commits message (lint-commits is currently red only because of the squash: markers).
Preserve failed invocation results when Lambda returns FAILED without an error payload. The local test runner now reports a failed execution instead of treating the result as successful. Expose terminal execution status on durable function test results and align cloud runner polling with the STOPPED terminal status.
d8badbe to
79d088b
Compare
Issue #, if available:
#656
Description of changes:
self._fail_workflow()instead ofself._complete_workflow()so that executions fail despite not having an error payloadTesting:
hatch run test:allBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.