Skip to content

fix: send --timeout 0 (no timeout) to the API in call, actors start and task run - #1491

Open
Pijukatel wants to merge 2 commits into
masterfrom
fix/run-timeout-zero
Open

Pijukatel wants to merge 2 commits into
masterfrom
fix/run-timeout-zero

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
  • apify call --timeout 0, apify actors start --timeout 0 and apify task run --timeout 0 silently dropped the flag: it was only forwarded when truthy, so the run got the Actor's default timeout instead of none, even though the flag's help text promises "zero value means there is no timeout".
  • Forward the flag whenever it is given; omitted still means the Actor's default.
  • Adds a unit test over all three commands (0 sent as 0, positive sent as is, omitted not sent).

…nd task run

The flag was forwarded only when truthy, so `--timeout 0` was dropped and the run got the Actor's
default timeout instead of none.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VTFswSQJstnQ6r8QeqfgK

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation correctly distinguishes zero from an omitted flag and is comprehensively tested.

0 open findings

What changed in this PR

Fixes zero-timeout handling for cloud Actor and Task runs.

Changes:

  • Forwards explicit --timeout 0 while preserving omitted-timeout behavior.
  • Adds parameterized coverage for all three affected commands.
File Description
src/​commands/​actors/​call.ts Preserves explicit zero timeout.
src/​commands/​actors/​start.ts Preserves explicit zero timeout.
src/​commands/​task/​run.ts Preserves explicit zero timeout.
test/​local/​commands/​run-timeout-flag.test.ts Tests zero, positive, and omitted timeouts.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Pijukatel
Pijukatel marked this pull request as ready for review October 12, 2026 12:03
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 12, 2026
@apify-service-account apify-service-account added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 12, 2026
@Pijukatel

Copy link
Copy Markdown
Contributor Author

Unrelated e2e test failures are already present on master

× shows input schema with --input flag 4712ms (retry x3)

@Pijukatel Pijukatel added the adhoc Ad-hoc unplanned task added during the sprint. label Oct 12, 2026
@Pijukatel
Pijukatel requested a review from vladfrangu October 12, 2026 12:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants