Skip to content

[bug]: input payload on fetch paginated state #299

@yaythomas

Description

@yaythomas

In an edge case where the Operations collection is empty on invoke due to size, it then later gets constructed via paginated api calls to

        execution_state.fetch_paginated_operations(
            invocation_input.initial_execution_state.operations,
            invocation_input.checkpoint_token,
            invocation_input.initial_execution_state.next_marker,
        )

https://github.com/aws/aws-durable-execution-sdk-python/blob/main/src/aws_durable_execution_sdk_python/execution.py#L330

The actual InputPayload will be on the EXECUTION operation after this fetch, whereas in the code currently it just uses the original input (which might be none)

        raw_input_payload: str | None = (
            invocation_input.initial_execution_state.get_input_payload()
        )

        input_event: MutableMapping[str, Any] = {}
        if raw_input_payload and raw_input_payload.strip():
            try:
                input_event = json.loads(raw_input_payload)
...
          user_future = executor.submit(func, input_event, durable_context)

user_future = executor.submit(func, input_event, durable_context)

Note this is not actually happening today due to how backend currently works, nonetheless, this is a flaw in the SDK logic.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions