Skip to content

fix(scrapy): log only the unique key of a failed request in scheduler errors - #1301

Merged
vdusek merged 2 commits into
masterfrom
fix/scrapy-scheduler-request-logs
Dec 2, 2026
Merged

vdusek merged 2 commits into
masterfrom
fix/scrapy-scheduler-request-logs

Conversation

@B4nan

@B4nan B4nan commented Dec 1, 2026

Copy link
Copy Markdown
Member

The Scrapy scheduler's error logs for a failed reclaim, a failed mark-as-handled and a request that can't be converted back to a Scrapy request passed the whole Apify request to %s. Pydantic's str prints every field, so each line carried the headers, the payload and the serialized Scrapy request from user_data.

These logs now print the request's unique key, which identifies it in the request queue (keys the SDK builds include the URL). The message templates are unchanged.

… errors

The scheduler's reclaim, mark-as-handled and conversion-failure logs passed the
whole Apify request to `%s`, which printed its headers, payload and the
serialized Scrapy request stored in `user_data`. They now log the request's
unique key, which identifies it in the request queue.
@B4nan B4nan 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 Dec 1, 2026

@vdusek vdusek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@vdusek
vdusek merged commit e95715e into master Dec 2, 2026
63 of 65 checks passed
@vdusek
vdusek deleted the fix/scrapy-scheduler-request-logs branch December 2, 2026 14:11
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants