Skip to content

test: serve the whole-log fallback in the streamed log mocks - #1114

Merged
vdusek merged 1 commit into
masterfrom
test/fix-flaky-streamed-log-fallback
Oct 12, 2026
Merged

vdusek merged 1 commit into
masterfrom
test/fix-flaky-streamed-log-fallback

Conversation

@vdusek

@vdusek vdusek commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Fixes a flaky test_actor_call_redirect_logs_to_default_logger_async[httpx2] (failed run).

When call() finishes before the log stream delivers its first chunk, StreamedLog reads the whole log with GET /log?raw=true (added in #1084). The mock_api and mock_api_failing_status_poll fixtures didn't serve that endpoint. In test_actor_call_returns_run_when_status_poll_fails_sync, the sync thread then retried the 500 with backoff, outlived the 5 s join in stop(), and logged its error into the next test's caplog on the same xdist worker.

Both fixtures now serve the whole log on that endpoint. Locally the failure went from 2/10 to 0/40 with the two tests in CI order, and test_logging.py under -n auto passed 30/30.

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 11, 2026
@vdusek vdusek self-assigned this Oct 11, 2026
@vdusek
vdusek requested a review from Mantisus October 11, 2026 21:13
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.46%. Comparing base (5f2b169) to head (4fb5116).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1114      +/-   ##
==========================================
- Coverage   95.50%   95.46%   -0.04%     
==========================================
  Files          61       61              
  Lines        5935     5935              
==========================================
- Hits         5668     5666       -2     
- Misses        267      269       +2     
Flag Coverage Δ
integration 90.78% <ø> (-0.04%) ⬇️
unit 88.87% <ø> (-0.04%) ⬇️

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 marked this pull request as ready for review October 11, 2026 21:13
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 11, 2026

@Mantisus Mantisus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@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 bdc6769 into master Oct 12, 2026
33 of 34 checks passed
@vdusek
vdusek deleted the test/fix-flaky-streamed-log-fallback branch October 12, 2026 06:30
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.

3 participants