Repository navigation
fix!: keep URL path, query and fragment casing in the default unique_key - #2371
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #2371 +/- ##
=====================================
Coverage ? 94.31%
=====================================
Files ? 187
Lines ? 13838
Branches ? 0
=====================================
Hits ? 13051
Misses ? 787
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
October 30, 2026 15:34
apify-factory
left a comment
There was a problem hiding this comment.
Looks good, nothing blocking.
🏭 Factory review — ℹ️ not auto-approved
This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.
| check | result |
|---|---|
| Static gates | ❌ 13/16 — base-branch, file-extensions, pr-title |
| Review findings | ✅ none |
| Reviewer escalation | ❌ Intentional breaking change to the default Request.unique_key (a public deduplication contract), which affects requests already persisted in existing request queues. |
Juror 1 — claude-sonnet-5-5, adversarial |
⏭️ skipped — a gate failed |
Why it was not auto-approved
Failed gates:
base-branch: base is v2, required masterfile-extensions: disallowed extension: docs/introduction/03_adding_more_urls.mdxpr-title: breaking changes are never auto-approved
The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.
Reviewed 9a70beeb6 · workflow run
vdusek
added a commit
that referenced
this pull request
Oct 31, 2026
…on reuse (#2373) Two tests added in #2349 fail intermittently in CI (seen on #2371). - `test_closing_unread_response_reuses_connection[impit]`: impit returns a drained connection to its pool in the background, so the request sent right after a close sometimes opens a second connection. Under load this failed in 2 of 120 local runs. The test now allows up to two connections. A working client opens 1 or 2, and one that drops the connections of closed responses always opens 3 (300 runs each), so the test still catches that regression. - `test_read_again_after_timeout[httpx]`: the 200 ms timeout covered the whole request, and the slow macOS runner didn't get the headers in time. The test now uses a 10 s timeout and moves the event loop clock past the deadline before the second `read()`, so it doesn't wait on the wall clock. Both tests still fail when the behavior they cover is broken. After the change, 1,440 runs under load passed. *✍️ Drafted by Claude Code*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
normalize_urllowercased the whole URL, so URLs that differ only in path or query casing (/Product/ABCand/product/abc) got the same defaultunique_key, and the crawler silently skipped one of them. It now lowercases only the scheme and host, which are the only case-insensitive parts per RFC 3986. This is the same asnormalizeUrlin Crawlee JS.Breaking, because default unique keys change for URLs with uppercase characters in the path, query or fragment. The v2 upgrade guide covers it, including how to keep case-insensitive deduplication.
Closes: #2008
✍️ Drafted by Claude Code