Integrate [DurableExecution] with the Annotations source generator#2410
Integrate [DurableExecution] with the Annotations source generator#2410GarrettBeatty wants to merge 2 commits into
Conversation
ab1af0b to
a921009
Compare
a921009 to
925f3b5
Compare
45da58d to
35c966c
Compare
| <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
| <!-- src\Function is a separate, self-contained project. Exclude its subtree so this project's | ||
| default globs don't pick up its sources or generated obj\AssemblyInfo (which causes CS0579). --> | ||
| <DefaultItemExcludes>$(DefaultItemExcludes);src\**</DefaultItemExcludes> |
There was a problem hiding this comment.
was running into build issue so fixed this too
| // the exact entry point the hand-written and executable test functions call, so the | ||
| // checkpoint/replay/history behavior is identical. | ||
| [LambdaFunction] | ||
| [DurableExecution] |
There was a problem hiding this comment.
i manually deployed this too and also played around with updating the attributes and checking that they reflected in the template too
Add a [DurableExecution] attribute (in Amazon.Lambda.Annotations) and source generator support so a method annotated with [LambdaFunction] + [DurableExecution] generates: - a typed-envelope handler wrapper delegating to DurableFunction.WrapAsync<TInput[,TOutput]> - a DurableConfig block on the function resource in the generated CFN/SAM template - lambda:CheckpointDurableExecution / lambda:GetDurableExecutionState IAM permissions (per-function inline policy; skipped when an explicit Role is set) Validation gates (AWSLambda0140-0143) require durable functions to be executable (OutputKind), Zip-packaged, and have the (TInput, IDurableContext) -> Task/Task<TOutput> signature; combining with another event attribute reuses the existing AWSLambda0102. The generated WrapAsync call emits explicit generic type arguments because method-group arguments cannot be inferred for the Func<,,> parameter (CS0411). fiox build annotations updates updates update docs pr comments
183524b to
5a5447e
Compare
| // Assembly::Type::Method), which LambdaFunctionModel.Handler already derives from IsExecutable. So no | ||
| // OutputKind gate is needed here. | ||
|
|
||
| // Image packaging strips Handler/Runtime from the function resource, which the durable |
There was a problem hiding this comment.
I don't understand this comment and why image functions don't work. Especially since that is how we tell customers to test the preview. Maybe a quick sync up between us to help me understand what is causing the issue.
There was a problem hiding this comment.
Might be AI slop. I also asked Claude about this, I think he mentioned the other annotations have the same limitation. I'll double check
There was a problem hiding this comment.
fixed in 3bee3f5. claude incorrectly assumed some things
Add a [DurableExecution] attribute (in Amazon.Lambda.Annotations) and source generator support so a method annotated with [LambdaFunction] + [DurableExecution] generates:
Issue #, if available:
#2418
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.