feat(sdk): add updated operations to invocation info#693
Merged
Conversation
…rtions Remove localOnly flag from all OTel examples to enable cloud deployment and integration testing. Update otel-invoke to target otel-basic-steps (which matches the *-NodeJS* IAM permission pattern) instead of a non-existent invoke-target function. Update retry-steps to use createRetryStrategy from the SDK. Strengthen test assertions to verify specific span names, types, parent-child hierarchy, and attributes rather than just counts.
…rtions Remove localOnly flag from all OTel examples to enable cloud deployment and integration testing. Update otel-invoke to target otel-basic-steps (which matches the *-NodeJS* IAM permission pattern). Update retry-steps to use createRetryStrategy from the SDK. Refactor tests to read spans from the exported getSerializedSpans() function after runner.run() returns (local) or from result.spans (cloud). This ensures the final invocation span is always included, giving consistent exact span counts across environments. Strengthen test assertions to verify specific span names, types, parent-child hierarchy, and attributes rather than just counts.
…helper Add type guard in assertSpanAttributes to skip metadata namespace entries that are not objects (e.g. plain strings like the function name), preventing TypeError when using the 'in' operator.
Add updatedOperations to InvocationInfo populated from the UpdatedOperationIds field in the durable Lambda invocation input. This gives plugin authors visibility into which operations changed externally between invocations (e.g., wait timer expired, callback received, chained invoke completed). Also refactor plugin type hierarchy: - Move operations and executionInput to InvocationBaseInfo - Decouple OperationChangeInfo from InvocationBaseInfo (inline executionArn, remove unused requestId)
InvocationEndInfo no longer inherits isFirstInvocation and updatedOperations from InvocationInfo. These fields are only relevant during invocation start and are not used by any onInvocationEnd consumer.
SilanHe
force-pushed
the
feat/add-updated-operations-to-invocation-info
branch
from
July 6, 2026 23:49
91e24bc to
886deaf
Compare
Remove isFirstInvocation and updatedOperations from makeInvocationEndInfo since InvocationEndInfo now extends InvocationBaseInfo directly.
Spread invocationBaseInfo instead of invocationInfo into onInvocationEnd calls so that only the fields from InvocationBaseInfo (requestId, executionArn, executionInput, operations) are passed, not isFirstInvocation or updatedOperations.
SilanHe
marked this pull request as ready for review
July 7, 2026 20:40
zhongkechen
reviewed
Jul 7, 2026
SilanHe
commented
Jul 7, 2026
zhongkechen
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
InvocationInfo now has an updatedOperations: Record<string, OperationInfo> field — the subset of operations that changed externally between invocations (populated from event.UpdatedOperationIds)
Type hierarchy (before → after):
BEFORE:
AFTER:
Key design decisions:
InvocationEndInfo no longer carries isFirstInvocation or updatedOperations — no onInvocationEnd consumer used them
OperationChangeInfo is fully decoupled — it only needs executionArn, not requestId
executionInput and operations live on InvocationBaseInfo so both InvocationInfo and InvocationEndInfo get them without duplication
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.