OpenFn / OpenFn/kit

CLI:`options.timeout` is not working

Open
#614 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

User story

In some cases i want my workflow to run longer the default timeout of 5minute ~ 300000ms.

Details

Using @openfn/cli v1.0.0 the options.timeout is not working, unless you specify the -t --timeout option when running your workflow.

Implementation notes

See sample workflow below 👇🏽 ,

{
  "options": {
    "start": "getUsers",
    "timeout": "300"
  },
  "workflow": {
    "steps": [
      {
        "id": "getUsers",
        "expression": "each([1,2,3,4,5],get(s=>`https://jsonplaceholder.typicode.com/users/${s.data}`))",
        "adaptor": "http"
      }
    ]
  }
}

If you run the workflow openfn worfklow.json -m -o tmp/output.json, The workflow will run successful but Ideally the workflow above should throw an error saying [R/T] ✘ Error: Timeout expired (300ms). But it doesn't fail unless you specify the timeout when running the workflow. Eg: openfn worfklow.json -m -o tmp/output.json -t 300.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided workflow and the openfn workflow.json -m -o tmp/output.json command, comparing it with the same command using -t 300. Trace how the workflow's options.timeout is read by the CLI and verify that completion or failure matches the requested timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.