Consider adding a GetHandleWrapper overload with Func<Task> and ILambdaSerializer
- Lingua principale
- C#
- Stelle
- 1.7k
- Fork
- 503
- Merge medio
- 1g 5h
- PR unite (30g)
- 18
Descrizione
## 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia leggendo gli overload esistenti di HandlerWrapper.GetHandlerWrapper, in particolare gli overload Func e Func generici che accettano ILambdaSerializer. Verifica come la selezione corrente degli overload gestisce un handler asincrono, quindi verifica che l’overload proposto impedisca all’handler di terminare prima che venga eseguito il suo lavoro asincrono.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, csharp
- Ambito
- backend, cloud
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100