dherault / dherault/serverless-offline

Timeout of scheduled lambda is broken since v.9.3.0

Open
#1,614 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
5.3k
Forks
811
Avg merge
2d 4h
Merged PRs (30d)
3

Description

If scheduled lambda doesn't return a truthy value, it will result in a timeout even if the handler function is processed normally.

For example, if you specify a scheduled lambda like:
```
timeout: 5
events:
- schedule: cron(20 * * * *)
```

And make the handler to be like this:
```
def handler(event, context):
print("hello")
return

```
And then run serverless-offline, it will result in a timeout. However, if you change `return` to `return True`, it will work as it should and timeout doesn't happen.

Now we are forced to make our scheduled lambdas to return True if we want to simulate them.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with serverless-offline using the scheduled configuration and the handler that prints "hello" and returns no value. Trace the scheduled lambda timeout path; done means a normally processed handler no longer times out when it returns a falsy value, while the existing truthy-return behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.