Repository navigation
feat: sync Rust client with Apify OpenAPI spec v2-2026-10-08T073338Z - #29
Merged
Merged
Conversation
…-10-08T073338Z Adds ActorStartOptions::wait_for_resources (ActorClient/TaskClient start/call retry run starts rejected for lack of memory or a concurrent-run slot), matching JS #1091. Fixes ListIterator (every collection's iterate()/iterate_items()) to stop paging on an empty page rather than a page's reported `total`, so a listing that grows during iteration (e.g. a dataset a running Actor keeps pushing to) is read to the end; dataset item iteration also now advances by the x-apify-pagination-count scanned count rather than items.len() when a filter/unwind makes them differ. Matches JS #1125. Fixes wait_for_finish to stop polling a run/build ID that keeps 404ing once a 3-second grace period elapses, instead of polling forever when wait_secs is None. Matches JS #1124's waitForFinish() fix. Reviewed and found not applicable to this client's architecture: JS #1122/#1121 (Rust's update()/unwind are already narrower than what those PRs restrict JS to), #1107 (no generated-model layer for a schema-title rename to propagate into), and #1123/#1105 (StreamedLog-internal bugs with no corresponding surface in Rust's plain Stream-returning log API). docs PR #3043's new Profile.readme field needs no code change (already reachable via the existing flatten-to-extra model pattern). Bumps API_SPEC_VERSION to v2-2026-10-08T073338Z and crate version to 0.12.0.
The comment on the `x-apify-pagination-total` fallback still described the old total-driven/short-page termination logic this PR's own ListIterator change removed. Re-describe the fallback as informational-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs the Rust client from OpenAPI spec
v2-2026-10-01T153946Ztov2-2026-10-08T073338Z(apify/apify-docs#3043, #3044, #3042) and ports the Rust-relevant changes from the referenceapify-client-jsbatch (apify/apify-client-js#1091, #1125, #1122, #1121, #1123, #1124, #1107, #1137, #1105).ActorStartOptions::wait_for_resources(newWaitForResourcesenum) onActorClient/TaskClientstart/call: retries a run start every 10s while the API rejects it withactor-memory-limit-exceeded/concurrent-runs-limit-exceeded(apify-client-js#1091).ListIterator(every collection'siterate()/iterate_items()) to stop paging on an empty page rather than a page's reportedtotal, so a listing that grows mid-iteration (e.g. a dataset a running Actor keeps pushing to) is read to the end.DatasetClient::iterate_itemsalso now advances by thex-apify-pagination-countscanned-row count rather thanitems.len()when a filter/unwindmakes them differ (apify-client-js#1125).wait_for_finishto stop polling a run/build ID that keeps 404ing once a 3-second grace period elapses (reset by any successful fetch), instead of polling forever whenwait_secsisNone(apify-client-js#1124).JS PRs #1122 (drop top-level
restartOnError) and #1121 (narrowunwindtostring[]) needed no Rust change:update()is already fully generic with no struct to narrow, andunwindhas always beenOption<Vec<String>>. #1107 (rename generated models to match spec schema titles) doesn't apply either — Rust's models aren't generated 1:1 from the spec. #1123/#1105 (StreamedLogstream-reopen/stop-hang fixes) patch bugs in JS's own internal log-streaming class; Rust'sLogClient::stream/stream_with_optionsreturns a plainStreamwith no equivalent internal state to patch. The spec's newProfile.readmefield (#3043) needs no code change — it's already reachable through the existing flatten-to-extramodel pattern, and #3044 is a pure schema-title/file rename with no wire-format change.Tests added/updated in
src/clients/pagination.rsandtests/unit_http.rs(8 new cases coveringwait_for_resourcesand the twowait_for_finish/pagination fixes, plus 7 updated/added pagination unit tests). Docs (docs/actors.md,docs/runs.md,docs/builds.md,docs/README.md) andCHANGELOG.mdupdated. Crate version bumped0.11.0→0.12.0(minor, new API surface).