Skip to content

fix: extend the request timeout by wait_for_finish in start() and build() - #1225

Merged
vdusek merged 3 commits into
masterfrom
fix/wait-for-finish-timeout
Nov 11, 2026
Merged

vdusek merged 3 commits into
masterfrom
fix/wait-for-finish-timeout

Conversation

@vdusek

@vdusek vdusek commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

ActorClient.start(), ActorClient.build(), ActorClient.default_build() and TaskClient.start() (and their async twins) send waitForFinish, but their request timeout was the plain tier (30 s, or 5 s for default_build()). The API holds the response for up to 60 s, so with a longer wait_for_finish the first attempt timed out and the client retried. For a POST this started a second run or build.

When timeout is a tier, these methods now add wait_for_finish (capped at 60 s) to it, as the JS client does in timeoutForWaitForFinish. An explicit timedelta and 'no_timeout' are used as given.

Closes: #1132

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 11, 2026
@vdusek vdusek self-assigned this Nov 11, 2026
@vdusek
vdusek marked this pull request as ready for review November 11, 2026 13:08
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Nov 11, 2026

@apify-factory apify-factory 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.

Looks good, nothing blocking.

🏭 Factory review — ℹ️ not auto-approved

This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.

check result
Static gates ❌ 15/16 — max-lines
Review findings ✅ none
Reviewer escalation ❌ The change alters the per-request timeouts (and so the retry timing) of start(), build(), default_build() and task start(), which is runtime configuration that a maintainer should confirm.
Juror 1 — claude-sonnet-5-5, adversarial ⏭️ skipped — a gate failed
Why it was not auto-approved

Failed gates:

  • max-lines: 277 changed lines (+251/-26), limit 200

The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.

Reviewed 6269d12cc · workflow run

@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (6f7375b) to head (4f5ec75).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1225      +/-   ##
==========================================
- Coverage   95.74%   95.71%   -0.04%     
==========================================
  Files          63       63              
  Lines        6658     6669      +11     
==========================================
+ Hits         6375     6383       +8     
- Misses        283      286       +3     
Flag Coverage Δ
integration 90.95% <100.00%> (+0.01%) ⬆️
unit 91.30% <100.00%> (+0.25%) ⬆️

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 requested a review from szaganek as a code owner November 11, 2026 13:14
@vdusek
vdusek requested a review from Mantisus November 11, 2026 13:15

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

@vdusek
vdusek merged commit 941d114 into master Nov 11, 2026
40 checks passed
@vdusek
vdusek deleted the fix/wait-for-finish-timeout branch November 11, 2026 16:13
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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

start() and build() with wait_for_finish above 30 s time out and retry the POST, starting a duplicate run

4 participants