Skip to content

fix: Correct inverted return value in Scrapy scheduler enqueue_request#794

Open
vdusek wants to merge 1 commit intomasterfrom
fix/scrapy-enqueue-request-return
Open

fix: Correct inverted return value in Scrapy scheduler enqueue_request#794
vdusek wants to merge 1 commit intomasterfrom
fix/scrapy-enqueue-request-return

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 16, 2026

Summary

Test plan

  • CI passes

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

The enqueue_request method was returning bool(result.was_already_present),
which incorrectly returned True for duplicates and False for newly enqueued
requests. Per Scrapy's BaseScheduler contract, it should return True when
the request was successfully stored (new) and False when rejected (duplicate).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 Feb 16, 2026
@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
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.50%. Comparing base (252eb4e) to head (6fe6898).

Files with missing lines Patch % Lines
src/apify/scrapy/scheduler.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #794      +/-   ##
==========================================
+ Coverage   85.46%   85.50%   +0.03%     
==========================================
  Files          46       46              
  Lines        2697     2697              
==========================================
+ Hits         2305     2306       +1     
+ Misses        392      391       -1     
Flag Coverage Δ
e2e 35.40% <0.00%> (ø)
integration 57.50% <0.00%> (+0.03%) ⬆️
unit 72.45% <0.00%> (ø)

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 added the bug Something isn't working. label Feb 16, 2026
@vdusek vdusek requested a review from Pijukatel February 16, 2026 17:10
@vdusek vdusek marked this pull request as ready for review February 16, 2026 17:10
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. bug Something isn't working. 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.

1 participant