Are async action timeouts configurable? From what I can tell, async actions have a default timeout of 30s. This limits their use case IMO, since their purpose is to perform some time-consuming action. As this 30 second timeout does not fit my application's needs, I would love to be able to configure this, if possible.
How to exactly configure timeout for action?
I've created new migration and added timeout argument like this:
- name: exportTemplate
definition:
handler: http://express:3000/actions/exportTemplate
timeout: 3600
but timeout is still 30 seconds.
@arys have you tried with the latest version?
@RodolfoSilva, sorry I didn't notice milestone v1.3.3 馃槄, I updated to latest version and it works now!
With me, the command:
hasura metadata export
This isn't working as expected, the command doesn't export the timeout.
@RodolfoSilva While adding the action, did you add a timeout with it? If you did, was the timeout 30 seconds? I ask this because currently we don't export the timeout when the timeout value is the default value (30 seconds).
@codingkarthik I've changed the action file putting timeout: 60, like @arys example, and executing the command: hasura metadata apply and later running hasura metadata export
actions.yaml
- name: my_awesome_action
definition:
kind: synchronous
handler: '{{ACTIONS_BASE_URL}}/my_awesome_action'
forward_client_headers: true
timeout: 120
I've tried modify directly in the database but this does't work.
$ hasura version
INFO hasura cli version=v1.3.3
INFO hasura graphql engine endpoint="http://localhost:8080" version=v1.3.3
@RodolfoSilva You mean you're not able to configure the timeout of the action, through the CLI?
@codingkarthik
Yes, with the CLI.
I've tried change directly in database, and use the CLI to export but this does not work too...
@RodolfoSilva if you have access to the hasura console, can you check by exporting metadata there?
Because, this seems to be an CLI issue.
cc: @scriptonist
@codingkarthik Yes, you are right. This is an issue with the CLI, after change directly in the database and export in the console, the timeout property is present in the JSON file.
{
"name": "my_awesome_action",
"definition": {
"handler": "{{ACTIONS_BASE_URL}}/my_awesome_action",
"output_type": "AwesomeOutput",
"forward_client_headers": true,
"arguments": [
{
"name": "id",
"type": "uuid!"
}
],
"type": "mutation",
"kind": "synchronous",
"timeout": 120
},
In the actions.go file has no mention of timeout
@RodolfoSilva created a new issue to track this https://github.com/hasura/graphql-engine/issues/6220
Testing v1.3.3 today, I could not find the timeout option on the modify action console page, nor could I find it when creating a new action, nor could I find it in the documentation. If it does not work through the CLI either (#6220), how is it supposed to be set?
EDIT: found #6207, so that explains why I could not find it in the UI.