digitalocean / digitalocean/doctl

doctl sls fn invoke not handling function timeout correctly

Open
#1,331 0 comments 0 reactions 0 assignees View on GitHub
bug Needs Investigation
Dominant language
Go
Stars
3.4k
Forks
496
Avg merge
1d 2h
Merged PRs (30d)
31

Description

**Describe the Issue:**

Invoke a function that times out, e.g.:
```
> time doctl sls fn invoke sleep
Request accepted, but processing not completed yet.
All functions invocation >= 30s will get demoted to an asynchronous invocation. Use --no-wait flag to immediately return the activation id.

Use this command to view the results.
doctl sls activations result

real 0m11.501s
user 0m0.043s
sys 0m0.024s
```

Observe that the activation id is `` and the response was a function timeout (confirmed with `activation list`) after ~10s not 30s. The error message is misleading and the id is missing.

I believe what's happening is that the response isn't handled correctly (the API response is (via the http path):
```
{"error":"The action exceeded its time limits of 10000 milliseconds during initialization."}
```

with no activation id in this case since the response terminate in time.

**Environment:**

- doctl version: doctl version 1.91.1-release (sls version 5.0.18)
- OS: macOS
- Installation method: download from github release

**Additional Details:**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.