Skip to content

Commit 6967db7

Browse files
Alex Wangwangyb-A
authored andcommitted
docs(plugin): add experimental metadata to payloads
Mark execution_input and execution_result with metadata={"experimental": True} and a leading EXPERIMENTAL docstring, matching the pattern #625 established for OperationInfo.result / OperationInfo.error / InvocationEndInfo.error. Unlike a docstring alone the metadata is introspectable at runtime, so the generic test #625 added -- which requires the marker on every plugin info field named for input, output, result or error -- now covers these two fields. That test fails on this branch without them. This matters more since #625 removed the plugins= FutureWarning: the per-field markers are now the only stability signal on these surfaces. Refs #616
1 parent 9a46294 commit 6967db7

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

  • packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python

packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python/plugin.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,15 @@ class InvocationInfo:
176176
execution_arn: str | None
177177
is_first_invocation: bool
178178
execution_start_time: datetime.datetime | None = None
179-
execution_input: Any = field(default=None, kw_only=True)
180-
"""EXPERIMENTAL: the deserialized execution input. May change or be removed.
179+
execution_input: Any = field(
180+
default=None,
181+
kw_only=True,
182+
metadata={"experimental": True},
183+
)
184+
"""EXPERIMENTAL: The deserialized execution input, when available.
181185
182186
Surfaced to instrumentation plugins that need to record it (e.g. Workflow
183-
Insight). Mirrors the JS SDK's ``InvocationInfo.executionInput``. kw_only so
184-
it never reorders the positional fields above.
187+
Insight). Mirrors the JS SDK's ``InvocationInfo.executionInput``.
185188
186189
Defaults to ``None`` only when the field is not populated (a hook info built
187190
without it); ``durable_execution()`` always populates it with the
@@ -202,13 +205,16 @@ class InvocationEndInfo(InvocationInfo):
202205
metadata={"experimental": True},
203206
)
204207
"""EXPERIMENTAL: The invocation error, when available."""
205-
execution_result: str | None = field(default=None, kw_only=True)
206-
"""EXPERIMENTAL: the serialized execution result. May change or be removed.
208+
execution_result: str | None = field(
209+
default=None,
210+
kw_only=True,
211+
metadata={"experimental": True},
212+
)
213+
"""EXPERIMENTAL: The serialized execution result, when available.
207214
208215
A JSON string, or ``""`` when the result was checkpointed out-of-band for a
209-
large payload. Surfaced to instrumentation plugins that record execution
210-
output (e.g. Workflow Insight); mirrors the JS SDK's
211-
``InvocationEndInfo.executionResult``. ``None`` on failure or suspend.
216+
large payload. Mirrors the JS SDK's ``InvocationEndInfo.executionResult``.
217+
``None`` on failure or suspend.
212218
"""
213219

214220
@classmethod

0 commit comments

Comments
 (0)