Consider adding a GetHandleWrapper overload with Func<Task> and ILambdaSerializer
- Vorherrschende Sprache
- C#
- Sterne
- 1.7k
- Forks
- 503
- Ø Merge
- 1 T. 5 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
## Describe the Feature
There are a number of `HandlerWrapper.GetHandlerWrapper` overloads, but two specific ones do not work well well together and might result in surprising behavior: `GetHandlerWrapper(Func)` and `GetHandlerWrapper(Func, ILambdaSerializer)`.
It's very easy to accidentally use the latter expecting proper async handling, because most overloads have an `ILambdaSerializer` parameter.
### Is your Feature Request related to a problem?
During the preview phase I started manually bootstrapping the Lambda SDK so I could test the preview builds. I started with my Kinesis handlers by using the `GetHandlerWrapper` overloads for that, which require the `ILambda Serializer` and continued to copy+paste that code for other signatures as well. One of those was for a `Func` handler and I just kept going copying the lambda serializer parameter as well.
That lambda then would run until the first, actual async sequence point is reached and then just successfully end, not actually running the required code. This was very hard to debug.
## Proposed Solution
Introducing a `GetHandlerWrapper(Func, ILambdaSerializer)` overload makes sure, this doesn't happen, even though the `ILambdaSerializer` isn't required in that context.
### Environment
* [ ] :wave: I may be able to implement this feature request
* [x] :warning: This feature might incur a breaking change
Introducing a new overload might break existing code, but it's likely that it fixes a bug by doing so.
---
This is a :rocket: Feature Request
Beitragsleitfaden
Rechercherichtung
Beginne damit, die vorhandenen HandlerWrapper.GetHandlerWrapper-Überladungen zu lesen, insbesondere die Func- und generischen Func-Überladungen, die ILambdaSerializer akzeptieren. Bestätige, wie die aktuelle Auswahl der Überladung einen asynchronen Handler behandelt, und überprüfe anschließend, dass die vorgeschlagene Überladung verhindert, dass der Handler beendet wird, bevor seine asynchrone Arbeit ausgeführt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, csharp
- Bereich
- backend, cloud
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100