Skip to content

Conversation

@Mirza-Samad-Ahmed-Baig
Copy link

• Fixed a file-system request-queue bug where get_request() incorrectly marked requests as in-progress, which could permanently block them from fetch_next_request(). I removed the side effect and added a regression test to ensure get_request() remains read-only

Signed-off-by: Mirza-Samad-Ahmed-Baig <Mirzasamadahmedbaig@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in the file-system request queue implementation where get_request() incorrectly marked requests as in-progress, preventing them from being fetched by fetch_next_request().

Changes:

  • Removed the side effect in get_request() that incorrectly added requests to the in-progress set
  • Added a regression test to ensure get_request() remains read-only and doesn't interfere with request fetching

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/crawlee/storage_clients/_file_system/_request_queue_client.py Removed two lines that incorrectly marked requests as in-progress in the get_request() method
tests/unit/storage_clients/_file_system/test_fs_rq_client.py Added regression test verifying that get_request() doesn't prevent subsequent fetch_next_request() calls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vdusek vdusek changed the title fix: avoid marking requests in progress on get_request fix: prevent get_request from permanently blocking requests Jan 26, 2026
Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

Hi @Mirza-Samad-Ahmed-Baig, I checked this against all other request queue client implementations (Memory, SQL, Redis, and Apify) and confirmed that none of them mark requests as in-progress in get_request. This is clearly a bug in the FS. Thanks for catching and fixing this!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants