Skip to content

feat: Migrate to Scrapy's native AsyncCrawlerRunner#793

Draft
vdusek wants to merge 2 commits intomasterfrom
fix/scrapy-async-crawler-runner
Draft

feat: Migrate to Scrapy's native AsyncCrawlerRunner#793
vdusek wants to merge 2 commits intomasterfrom
fix/scrapy-async-crawler-runner

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 16, 2026

Description

  • Adopt Scrapy 2.14's AsyncCrawlerRunner to eliminate the deferred_to_future conversion layer.
  • Function run_scrapy_actor now handles install_reactor internally, removing boilerplate from user code.

Issue

Test plan

  • CI passes

Adopt Scrapy 2.14's AsyncCrawlerRunner to eliminate the Deferred conversion
layer (deferred_to_future). The run_scrapy_actor function now handles
asyncio reactor installation internally, removing boilerplate from user code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek self-assigned this Feb 16, 2026
@github-actions github-actions bot added this to the 134th sprint - Tooling team milestone Feb 16, 2026
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Feb 16, 2026
@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.45%. Comparing base (252eb4e) to head (dd6317e).

Files with missing lines Patch % Lines
src/apify/scrapy/_actor_runner.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #793      +/-   ##
==========================================
- Coverage   85.46%   85.45%   -0.01%     
==========================================
  Files          46       46              
  Lines        2697     2696       -1     
==========================================
- Hits         2305     2304       -1     
  Misses        392      392              
Flag Coverage Δ
e2e 35.42% <0.00%> (+0.01%) ⬆️
integration 57.49% <0.00%> (+0.02%) ⬆️
unit 72.44% <16.66%> (-0.02%) ⬇️

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.

@vdusek vdusek changed the title fix: migrate to Scrapy's native AsyncCrawlerRunner fix: Migrate to Scrapy's native AsyncCrawlerRunner Feb 16, 2026
Scrapy 2.14+ deprecated the spider argument in process_item() and newer
versions no longer pass it, causing TypeError in PriceCleanerPipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek changed the title fix: Migrate to Scrapy's native AsyncCrawlerRunner feat: Migrate to Scrapy's native AsyncCrawlerRunner Feb 16, 2026
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.

Utilize Scrapy's native async runners - AsyncCrawlerRunner and/or AsyncCrawlerProcess

1 participant