Skip to content

feat: add wait_for_resources to the methods that start a run - #1273

Open
vdusek wants to merge 4 commits into
feat/child-run-concurrency-limitfrom
feat/child-run-wait-for-resources
Open

vdusek wants to merge 4 commits into
feat/child-run-concurrency-limitfrom
feat/child-run-wait-for-resources

Conversation

@vdusek

@vdusek vdusek commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Part 6 of 6 of the final specification of Actor composability. Stacked on #1154.

  • New option wait_for_resources: bool | timedelta = False on Actor.start, Actor.call, Actor.start_task, and Actor.call_task. A start that the API rejects for the memory or concurrent-run limit of the account is retried every 10 seconds. True retries until the run starts, and a timedelta stops after that time and raises the last error.
  • With child run tracking on, the SDK retries the start itself. Between two attempts the start is not in flight, so it does not count toward the concurrency limit, and a reboot does not wait for it. With tracking off, the option goes to the API client.
  • After the abort starts, a start that waits for resources raises a RuntimeError.
  • A call that returns a recorded run starts nothing, so the option has no effect on it.

Closes: apify/apify-client-python#1071

✍️ Drafted by Claude Code

@vdusek
vdusek added this pull request to stack #1274 November 20, 2026 16:35
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 20, 2026
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.14%. Comparing base (79c304e) to head (8cc5d2b).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/child-run-concurrency-limit    #1273      +/-   ##
====================================================================
+ Coverage                             94.01%   94.14%   +0.12%     
====================================================================
  Files                                    54       54              
  Lines                                  4196     4235      +39     
====================================================================
+ Hits                                   3945     3987      +42     
+ Misses                                  251      248       -3     
Flag Coverage Δ
e2e 30.97% <22.22%> (-0.08%) ⬇️
integration 49.58% <24.44%> (-0.20%) ⬇️
unit 91.59% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 20, 2026
@vdusek vdusek self-assigned this Nov 20, 2026
@vdusek
vdusek force-pushed the feat/child-run-wait-for-resources branch from e8bce80 to b6082a7 Compare November 20, 2026 17:52
@vdusek
vdusek marked this pull request as ready for review November 20, 2026 17:58
@vdusek
vdusek requested review from Pijukatel and barjin November 20, 2026 17:58
@vdusek
vdusek force-pushed the feat/child-run-wait-for-resources branch from b6082a7 to 0b77368 Compare November 20, 2026 18:39
@vdusek
vdusek force-pushed the feat/child-run-wait-for-resources branch from 9dbdd2f to 2f79ab9 Compare November 27, 2026 14:12
@vdusek
vdusek removed this pull request from stack #1274 November 27, 2026 14:16
@vdusek
vdusek added this pull request to stack #1286 November 27, 2026 14:16
@vdusek vdusek removed the adhoc Ad-hoc unplanned task added during the sprint. label Nov 28, 2026

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

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.

Retry starting a run on memory and concurrent-runs limits

1 participant