Skip to content

fix: align key iteration timeout with key listing - #1181

Merged
vdusek merged 1 commit into
apify:masterfrom
kocaemre:fix/kvs-iterate-keys-timeout-1173
Oct 30, 2026
Merged

vdusek merged 1 commit into
apify:masterfrom
kocaemre:fix/kvs-iterate-keys-timeout-1173

Conversation

@kocaemre

Copy link
Copy Markdown
Contributor

Summary

  • Use the same medium HTTP timeout for iterate_keys() as list_keys() in both sync and async clients. This applies to every paginated key request; callers can still pass an explicit timeout.
  • Add multi-page regressions for both clients and both supported HTTP transports.

Fixes #1173.

Verification

  • RED: uv run --extra httpx2 pytest tests/unit/test_client_pagination.py -k 'kvs_iterate_keys_uses_list_keys_default_timeout' -q -o addopts='' --tb=short -> 4 expected failures (the page calls used long).
  • GREEN: same command -> 4 passed; uv run --extra httpx2 pytest tests/unit/test_client_pagination.py -q -o addopts='' --tb=short -> 756 passed.
  • uv run --extra httpx2 --extra brotli poe unit-tests -> 2412 passed, 1 skipped (upstream generator incompatibility on Python 3.15).
  • uv run --extra httpx2 poe check-docstrings, uv run --extra httpx2 ty check src/apify_client/_resource_clients/key_value_store.py tests/unit/test_client_pagination.py, uv run --extra httpx2 ruff check src/apify_client/_resource_clients/key_value_store.py tests/unit/test_client_pagination.py, uv run --extra httpx2 ruff format --check src/apify_client/_resource_clients/key_value_store.py tests/unit/test_client_pagination.py, git diff --check -> passed.
  • No live API integration tests; the regressions use a local pagination HTTP server.

AI assistance was used for implementation and tests; the change and verification were reviewed locally.

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 merged commit 6097ad3 into apify:master Oct 30, 2026
33 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.

iterate_keys defaults to the long timeout while list_keys uses medium

2 participants