Skip to content

fix: respect timeout when polling in ActorClient.call() and TaskClient.call() - #1184

Merged
vdusek merged 2 commits into
apify:masterfrom
kocaemre:fix/call-poll-timeout-1171
Nov 2, 2026
Merged

vdusek merged 2 commits into
apify:masterfrom
kocaemre:fix/call-poll-timeout-1171

Conversation

@kocaemre

Copy link
Copy Markdown
Contributor

Summary

  • Forward call(timeout=...) to wait_for_finish for both Actor and Task clients, sync and async, including Actor log redirection. The timeout remains per HTTP request; wait_duration still controls overall waiting.
  • Clarify the timeout docstrings and add six focused unit cases.

Fixes #1171.

Verification

  • RED (before fix): uv run --extra httpx2 --extra brotli pytest tests/unit/test_call_poll_timeout.py -q -o addopts='' --tb=short -> 4 failures: polls received wait_duration without timeout. For the log-redirection branches, the same command with -k log_redirect against the original calls -> 2 expected failures.
  • GREEN: uv run --extra httpx2 --extra brotli pytest tests/unit/test_call_poll_timeout.py -q -o addopts='' --tb=short -> 6 passed.
  • uv run --extra httpx2 --extra brotli pytest tests/unit -q -n 4 -o addopts='' --tb=short -> 2418 passed, 1 skipped (Python 3.15 model generator incompatibility).
  • uv run --extra httpx2 --extra brotli poe check-docstrings -> passed; touched-file ruff check, ruff format --check, ty check, and git diff --check -> passed.

AI assistance: implementation and tests were drafted with an AI coding assistant and verified locally. No live Apify API calls were made.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 30, 2026
@vdusek vdusek changed the title fix: apply call timeout to run polling fix: pass timeout to wait_for_finish in Actor and task call Nov 2, 2026
@vdusek vdusek changed the title fix: pass timeout to wait_for_finish in Actor and task call fix: respect timeout when polling in ActorClient.call() and TaskClient.call() Nov 2, 2026
@vdusek
vdusek merged commit a5a95d2 into apify:master Nov 2, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ActorClient.call and TaskClient.call apply timeout only to the start request

2 participants