Skip to content

[SVLS-8580] fix: correct durable execution statuses to match Python SDK InvocationStatus enum#793

Merged
lym953 merged 1 commit intomainfrom
yiming.luo/fix-durable-execution-status
Apr 15, 2026
Merged

[SVLS-8580] fix: correct durable execution statuses to match Python SDK InvocationStatus enum#793
lym953 merged 1 commit intomainfrom
yiming.luo/fix-durable-execution-status

Conversation

@lym953
Copy link
Copy Markdown
Contributor

@lym953 lym953 commented Apr 15, 2026

Summary

Fixes wrong statuses introduced in #751. The VALID_DURABLE_STATUSES set was using STOPPED and TIMED_OUT, which belong to OperationStatus (individual operation level). The invocation-level InvocationStatus enum in the Python durable execution SDK only defines:

  • SUCCEEDED
  • FAILED
  • PENDING

Changes

  • datadog_lambda/durable.py: Replace {"SUCCEEDED", "FAILED", "STOPPED", "TIMED_OUT"} with {"SUCCEEDED", "FAILED", "PENDING"}
  • tests/test_durable.py: Replace test_returns_stopped + test_returns_timed_out with test_returns_pending

Testing

Tested with a durable function that has two invocations per execution.

The aws.lambda span for the 1st invocation has tag execution_status:PENDING (link)
image

For the 2nd invocation, the tag is execution_status:FAILED (link) or execution_status:SUCCEEDED (link)
image

image

🤖 Generated with Claude Code

…nStatus enum

SUCCEEDED, FAILED, STOPPED, TIMED_OUT → SUCCEEDED, FAILED, PENDING.
STOPPED and TIMED_OUT are OperationStatus values; InvocationStatus only
defines SUCCEEDED, FAILED, and PENDING.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lym953 lym953 marked this pull request as ready for review April 15, 2026 04:03
@lym953 lym953 requested review from a team as code owners April 15, 2026 04:03
@lym953 lym953 requested a review from shreyamalpani April 15, 2026 04:03
@lym953 lym953 changed the title fix: correct durable execution statuses to match Python SDK InvocationStatus enum [SVLS-8580] fix: correct durable execution statuses to match Python SDK InvocationStatus enum Apr 15, 2026
Copy link
Copy Markdown

@litianningdatadog litianningdatadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lym953 lym953 merged commit 5b292db into main Apr 15, 2026
105 checks passed
@lym953 lym953 deleted the yiming.luo/fix-durable-execution-status branch April 15, 2026 18:18
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.

2 participants