Skip to content

test: Bump apify-cli subprocess timeouts to 600s for heavier templates#1910

Closed
vdusek wants to merge 1 commit into
masterfrom
test/bump-apify-cli-subprocess-timeout
Closed

test: Bump apify-cli subprocess timeouts to 600s for heavier templates#1910
vdusek wants to merge 1 commit into
masterfrom
test/bump-apify-cli-subprocess-timeout

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented May 22, 2026

Summary

The poetry-curl-impersonate-adaptive-parsel variant of test_static_crawler_actor_at_apify is failing every scheduled run with subprocess.TimeoutExpired: Command '['apify', 'push']' timed out after 120 seconds (example failing job). The job total (522s) matches 4 × 120s + setup, i.e. the timeout fires on every rerun — retries cannot absorb the wall.

Root cause: apify push waits server-side for the actor's Docker build to finish before returning. The captured stderr shows a ~550 MB base image mid-download when the timeout fires:

#6 sha256:a9e4a63… 99.61MB / 547.96MB 1.5s

So the CLI is not hung — the build is just genuinely slower than 120s for heavier templates (adaptive crawlers, playwright-based ones). The 120s timeout was added in #1905 with the reasoning that a hung CLI should fail fast, but that's a false dichotomy for builds that take 2–5 minutes.

Fix

Bump the timeout on all three apify-cli subprocess.run calls (login, init, push) from 120s to 600s. The 1800s pytest-timeout per test still bounds a truly hung CLI, and @pytest.mark.flaky(reruns=3) still covers transient network/CLI flakes.

`apify push` waits server-side for the actor's Docker build to complete
before returning, and the heavier templates (e.g. adaptive-parsel with a
~550 MB base image) consistently exceed the previous 120s budget — all
4 rerun attempts hit the timeout, so retries don't help. Bump every
apify-cli subprocess timeout to 600s; the 1800s pytest-timeout still
bounds a truly hung CLI.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels May 22, 2026
@vdusek vdusek self-assigned this May 22, 2026
@github-actions github-actions Bot added this to the 141st sprint - Tooling team milestone May 22, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 22, 2026
@vdusek
Copy link
Copy Markdown
Collaborator Author

vdusek commented May 22, 2026

Folding into #1909 — same scheduled e2e failure mode (Apify builds need more time). Branch will be deleted.

@vdusek vdusek closed this May 22, 2026
@vdusek vdusek deleted the test/bump-apify-cli-subprocess-timeout branch May 22, 2026 10:58
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.87%. Comparing base (41433a3) to head (ad4623f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1910      +/-   ##
==========================================
- Coverage   92.89%   92.87%   -0.03%     
==========================================
  Files         167      167              
  Lines       11714    11714              
==========================================
- Hits        10882    10879       -3     
- Misses        832      835       +3     
Flag Coverage Δ
unit 92.87% <ø> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. 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.

2 participants