instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apify__crawlee-python__1757 | apify/crawlee-python | 1,757 | defect | 7663404dd9a309a7c3a680a6005250b2007b04ff | 1e4a7ec5f1e06f4d56b51e7f6c3cab5828dcc781 | feat: Use specialized Playwright docker images in templates | ### Description
- Update templates to use a browser-specialized Playwright Docker image
- Add specialized templates: `playwright-chrome`, `playwright-firefox`, `playwright-webkit`
- Update e2e tests to include new templates
- Update `PlaywrightBrowserPlugin` to not raise an Exception when browser `type='chrome'` ... | diff --git a/.github/workflows/on_schedule_tests.yaml b/.github/workflows/on_schedule_tests.yaml
index fafe09fcca..116a9c8a5e 100644
--- a/.github/workflows/on_schedule_tests.yaml
+++ b/.github/workflows/on_schedule_tests.yaml
@@ -24,8 +24,8 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
- ... | 9 | 5 | 3 | [{"id": "G0", "claim": "The debug-log check inspects default_launch_browser_options before merging in browser_launch_options, so it can miss a caller-provided executable_path or log a path that browser_launch_options later overrides; compute the effective merged launch options first (or check both sources).", "category... | null |
apify__crawlee-python__1775 | apify/crawlee-python | 1,775 | defect | a918a346014c5d96ef0587a35909bf880b59a516 | 447ba2322d426341edecd6f3a66bd7cd467c32cf | fix: Return `None` from `add_request` when storage client fails to enqueue request | ### Description
- This PR updates the signature for `RequestManager.add_request` to return `None` when the storage client fails to process the request and returns it in `AddRequestsResponse.unprocessed_requests`. Previously, accessing `processed_requests[0]` on an empty list caused an `IndexError`.
### Testing
... | diff --git a/src/crawlee/request_loaders/_request_manager.py b/src/crawlee/request_loaders/_request_manager.py
index 8a815a4889..4991bd156d 100644
--- a/src/crawlee/request_loaders/_request_manager.py
+++ b/src/crawlee/request_loaders/_request_manager.py
@@ -28,7 +28,7 @@ async def add_request(
request: str | ... | 2 | 1 | 0 | [{"id": "G0", "claim": "The warning log should identify the storage client, e.g. 'Request {request.url} was not processed by storage client {storage_client}.', if the client name can be obtained there.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim... | null |
apify__crawlee-python__1777 | apify/crawlee-python | 1,777 | defect | 944753a71956c30f3ce0896ffa24be7de5348933 | a5c54eee98a51d92dd1551bdbddce21444c80e5e | feat: add `discover_valid_sitemaps` utility | ### Description
- Add `discover_valid_sitemaps` utility to search for sitemaps of websites for the provided URLs.
### Issues
- Closes: #1740
### Testing
- Add new unit tests
| diff --git a/src/crawlee/_utils/sitemap.py b/src/crawlee/_utils/sitemap.py
index 95d1e26a5f..f77909869c 100644
--- a/src/crawlee/_utils/sitemap.py
+++ b/src/crawlee/_utils/sitemap.py
@@ -1,8 +1,10 @@
from __future__ import annotations
import asyncio
+import re
import zlib
from codecs import getincrementaldecoder
... | 10 | 6 | 3 | [{"id": "G0", "claim": "Input URL sitemap detection only yields the first matching URL, so if multiple input URLs already point to different sitemaps the others are ignored; iterate all matching input URLs and yield each, still respecting de-duplication.", "category": "correctness", "verdict": "supported", "priority": ... | null |
apify__crawlee-python__1781 | apify/crawlee-python | 1,781 | defect | d4c51f8c03796777f4f4f024fb065a53eb7ee8b4 | 6665b026c5aefcdb705728e695d89a65f966a8c0 | feat: allow non-href links extract & enqueue | ### Description
Right now `href` attribute is hardcoded for `enqueue_links` and `extract_links` methods.
This change would allow to:
- grab image links
- grab links from exotic attributes in SPA
Examples:
```python
await context.extract_links(selector="nav ul li", attribute="data-href")
await context.en... | diff --git a/docs/guides/code_examples/http_crawlers/selectolax_parser.py b/docs/guides/code_examples/http_crawlers/selectolax_parser.py
index 0c38b1e9bf..b8fca8b38c 100644
--- a/docs/guides/code_examples/http_crawlers/selectolax_parser.py
+++ b/docs/guides/code_examples/http_crawlers/selectolax_parser.py
@@ -45,7 +45,... | 2 | 2 | 2 | [{"id": "G0", "claim": "The NON_HREF_LINKS test fixture contains malformed HTML: the `<li data-href=\"/page_2\">` element is closed with `</a>` instead of `</li>`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Tests should also be added for `enqueu... | null |
apify__crawlee-python__1787 | apify/crawlee-python | 1,787 | defect | b8497e73bd59d089dcd0397687a5d70732b4777b | 3c03a129a1d7515a741d4572084daf893137e048 | fix(redis): Do not remove handled request data from request queue | ### Description
Unlike FS and SQL storages that keep handled requests data, Redis removes it.
### Issues
?
### Testing
A dedicated unit test added.
Manual testing: using RedisQueueClient, enqueue a page, run crawler, check if `:data` key holds request info.
### Checklist
- [ ] CI passed
| diff --git a/src/crawlee/storage_clients/_redis/_request_queue_client.py b/src/crawlee/storage_clients/_redis/_request_queue_client.py
index 26d754eed8..6bd0fb19ed 100644
--- a/src/crawlee/storage_clients/_redis/_request_queue_client.py
+++ b/src/crawlee/storage_clients/_redis/_request_queue_client.py
@@ -402,7 +402,6 ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new handled-request persistence test should be moved from tests/unit/storage_clients/_redis/test_redis_rq_client.py into tests/unit/storages/test_request_queue.py as a general request-queue test, parametrized across all storage clients to ensure consistency among them.", "category": "testing... | null |
apify__crawlee-python__1791 | apify/crawlee-python | 1,791 | defect | b8497e73bd59d089dcd0397687a5d70732b4777b | a07ea343ea4349d5ebb0302b1287d65678c02e1d | feat: Add page lifecycle hooks to `BrowserPool` | ### Description
Add four page lifecycle hooks to `BrowserPool` registered as decorators:
- `pre_page_create_hook` — called before page creation; `browser_new_context_options` is mutable, so the hook can affect how the page context is configured.
- `post_page_create_hook` — called after page creation.
- `pre_page_... | diff --git a/src/crawlee/browsers/_browser_pool.py b/src/crawlee/browsers/_browser_pool.py
index 0f27634683..fb9e670928 100644
--- a/src/crawlee/browsers/_browser_pool.py
+++ b/src/crawlee/browsers/_browser_pool.py
@@ -19,7 +19,7 @@
from crawlee.browsers._types import BrowserType, CrawleePage
if TYPE_CHECKING:
- ... | 6 | 3 | 2 | [{"id": "G0", "claim": "If no close hooks are registered when a page is created, `close` is never overridden for that page, so a close hook registered after the page was created will not fire; the reviewer asks to always override page close or defer the check to close time.", "category": "correctness", "verdict": "oppo... | null |
apify__crawlee-python__1795 | apify/crawlee-python | 1,795 | defect | 9fee0a2d9de1f91dbba996ab185615e138c990fc | e61140bc8ccf58931acc97f12c6fb628f78b2695 | feat: Add `post_navigation_hooks` to crawlers | ### Description
- Add `post_navigation_hooks` that run after navigation.
### Issues
- Relates: #1741
### Testing
- Tests for navigation hooks have been added and updated.
| diff --git a/src/crawlee/crawlers/__init__.py b/src/crawlee/crawlers/__init__.py
index 5d0825eb01..6445ad5d64 100644
--- a/src/crawlee/crawlers/__init__.py
+++ b/src/crawlee/crawlers/__init__.py
@@ -15,13 +15,25 @@
with _try_import(__name__, 'ParselCrawler', 'ParselCrawlingContext'):
from ._parsel import ParselCr... | 11 | 8 | 3 | [{"id": "G0", "claim": "In both adaptive post-navigation hook adapters the wrapped AdaptivePlaywrightPostNavCrawlingContext (including the potentially expensive page.evaluate and response conversion) is recomputed once per registered hook; build the wrapper once per navigation and invoke all hooks with the same instanc... | null |
apify__crawlee-python__1814 | apify/crawlee-python | 1,814 | defect | 8812d480071f1c9b9561f0c3b667c6d4622884b1 | e2206498fe215cb357dbda9d3708dd604102e03e | fix: Defer page object cleanup to make it accessible in error handlers | - closes #1482
| diff --git a/src/crawlee/_types.py b/src/crawlee/_types.py
index f48b545a82..9df2acba59 100644
--- a/src/crawlee/_types.py
+++ b/src/crawlee/_types.py
@@ -661,6 +661,9 @@ class BasicCrawlingContext:
log: logging.Logger
"""Logger instance."""
+ register_deferred_cleanup: Callable[[Callable[[], Coroutine[N... | 4 | 3 | 0 | [{"id": "G0", "claim": "The whole deferred-cleanup loop could be moved into the try block as the lint rule suggests instead of using a bare try/except per iteration.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Exceptions in the page-cleanup cal... | null |
apify__crawlee-python__1837 | apify/crawlee-python | 1,837 | defect | 31509e0835f076a565321431dee7fb2d7854c1c8 | 88eba6ecf428e18742087d905f6f6f05b0a45c9d | fix: Apply SQLite optimizations to the custom `connection_string` in `SqlStorageClient` | ### Description
- Since `crawlee` can have highly concurrent access to the database, SQLite optimizations must be applied, the most critical being `journal_mode=WAL`. If a user wants fine-grained control over connections, they should pass a custom `engine` instead of a 'connection_string'.
### Issues
- Relates... | diff --git a/src/crawlee/storage_clients/_sql/_storage_client.py b/src/crawlee/storage_clients/_sql/_storage_client.py
index cb2c4bde92..a54642b90b 100644
--- a/src/crawlee/storage_clients/_sql/_storage_client.py
+++ b/src/crawlee/storage_clients/_sql/_storage_client.py
@@ -72,8 +72,10 @@ def __init__(
self._i... | 2 | 2 | 1 | [{"id": "G0", "claim": "There is no unit test asserting that the SQLite pragmas (e.g. journal_mode becoming wal after initialize()) are applied when a custom SQLite connection_string is provided, and a targeted test should be added to prevent regressions.", "category": "testing", "verdict": "supported", "priority": "P1... | null |
apify__crawlee-python__1838 | apify/crawlee-python | 1,838 | defect | cf6737c8e8924363d0630a982940010bffa9030b | 2d6e3ad196a04c54b8b584b8b2e2e1edc4d9525b | fix: Add retry logic for `RedisStorageClient` and `SqlStorageClient` | ### Description
- Adds `retry_on_error` decorator with exponential backoff
- Applies retry to all operations in `SqlStorageClient` and `RedisStorageClient` to handle transient failures
### Issues
- Closes: #1831
| diff --git a/src/crawlee/errors.py b/src/crawlee/errors.py
index 539bcf7711..e75858dd35 100644
--- a/src/crawlee/errors.py
+++ b/src/crawlee/errors.py
@@ -18,6 +18,7 @@
'RequestHandlerError',
'ServiceConflictError',
'SessionError',
+ 'StorageWriteError',
'UserDefinedErrorHandlerError',
]
@@ -1... | 4 | 3 | 3 | [{"id": "G0", "claim": "KeyValueStore.set_value only logs a warning and returns successfully after exhausting retries, silently dropping failed writes so callers believe the value was persisted; it should re-raise the last StorageWriteError instead.", "category": "correctness", "verdict": "supported", "priority": "P1",... | null |
apify__crawlee-python__1839 | apify/crawlee-python | 1,839 | defect | cf6737c8e8924363d0630a982940010bffa9030b | 992751f1a2b1417cc41e685a055580379b0bef5a | fix: Apply `SharedTimeout` to post-navigation hooks | ## Summary
- Post-navigation hooks in `AbstractHttpCrawler` and `PlaywrightCrawler` had no timeout enforcement, allowing a misbehaving hook to hang the crawler indefinitely.
- Applied the existing shared navigation timeout budget to post-navigation hooks, so pre-nav hooks + navigation + post-nav hooks all share the... | diff --git a/src/crawlee/crawlers/_abstract_http/_abstract_http_crawler.py b/src/crawlee/crawlers/_abstract_http/_abstract_http_crawler.py
index c4ef4a14f9..d2b4fe559f 100644
--- a/src/crawlee/crawlers/_abstract_http/_abstract_http_crawler.py
+++ b/src/crawlee/crawlers/_abstract_http/_abstract_http_crawler.py
@@ -130,2... | 1 | 1 | 0 | [{"id": "G0", "claim": "Pull the initialization and cleanup of the `SharedTimeout` out of `_execute_pre_navigation_hooks` into a separate context pipeline step so that it doesn't look like it's tied to pre-navigation hooks.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apify__crawlee-python__1843 | apify/crawlee-python | 1,843 | defect | 2eda2802144e9c11e90c5f1ff9bf2cfcebbc5761 | 7442320ef8920bc914465db4a8845631e754e171 | fix: Fix potential deadlocks in `SitemapRequestLoader` and `RequestManagerTandem` | ### Description
- This PR fixes several issues in `SitemapRequestLoader` and `RequestManagerTandem` that could cause the crawler to deadlock or stall indefinitely.
### Issues
- Relates: #1842
| diff --git a/src/crawlee/request_loaders/_request_manager_tandem.py b/src/crawlee/request_loaders/_request_manager_tandem.py
index 4f33d41cf3..3798e2e49a 100644
--- a/src/crawlee/request_loaders/_request_manager_tandem.py
+++ b/src/crawlee/request_loaders/_request_manager_tandem.py
@@ -89,6 +89,9 @@ async def fetch_nex... | 4 | 4 | 2 | [{"id": "G0", "claim": "Please add a unit test covering the new capacity-signal behavior where the queue becomes full, the next fetched URL is skipped via transform_request_function, and the loader continues to enqueue/serve subsequent URLs without hanging.", "category": "testing", "verdict": "supported", "priority": "... | null |
apify__crawlee-python__1857 | apify/crawlee-python | 1,857 | defect | 965780b2b14914e4f6614e86fff60715a4604ef6 | 92d0ad02574bee44f27575c647e8ad6f1b1f0cfc | feat: Add `use` to `Router` for middleware support with pre-handler execution | ### Description
- Add `Router.use()` for registering middleware functions that execute sequentially before the matched request handler, regardless of the request label.
### Issues
- Closes: #1742
### Testing
- Add new tests for `Router`.
| diff --git a/docs/guides/code_examples/request_router/router_middleware.py b/docs/guides/code_examples/request_router/router_middleware.py
new file mode 100644
index 0000000000..3f9e04304c
--- /dev/null
+++ b/docs/guides/code_examples/request_router/router_middleware.py
@@ -0,0 +1,50 @@
+import asyncio
+import time
+
+... | 5 | 4 | 0 | [{"id": "G0", "claim": "The middleware typing `Callable[[TCrawlingContext], Awaitable]` (and the `list[Callable[..., Awaitable]]` storage) drops the awaited result type and is inconsistent with the existing `RequestHandler = Callable[[TCrawlingContext], Awaitable[None]]` alias, so middleware signatures should reuse the... | null |
apify__crawlee-python__222 | apify/crawlee-python | 222 | defect | 8aa8c57f44149caa0e01950a5d773726f261699a | b94691527c46f7698428584bb283ac68248b846b | feat: BasicCrawler.export_data helper | - closes #211
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 459ff3c5a7..16ecd9d2ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## [0.0.6](../../releases/tag/v0.0.6) - Unreleased
+### Adds
+
+- BREAKING: `BasicCrawler.export_data` helper method which replaces `BasicCrawler.export_to`
+
### Fixes
- Handling... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new `Dataset.write_to` method's name is not consistent with the crawler's helper; the reviewer asks why it is not named `export_data` like `BasicCrawler.export_data` (open to a better name).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"... | null |
apify__crawlee-python__318 | apify/crawlee-python | 318 | defect | 1585defffb2c0c844fab39bbc0e0b793d6169cbf | e29486dca76ed2e04fd0af90ca088340760334ba | fix: project bootstrapping in existing folder | - closes #301
Typer bit me quite hard here, but we should be out of the dark now.
| diff --git a/src/crawlee/cli.py b/src/crawlee/cli.py
index 36a193d214..f2a28afcbc 100644
--- a/src/crawlee/cli.py
+++ b/src/crawlee/cli.py
@@ -2,12 +2,13 @@
from __future__ import annotations
from pathlib import Path
-from typing import Annotated, Union
+from typing import Annotated, Optional, cast
import httpx
... | 2 | 2 | 1 | [{"id": "G0", "claim": "Add tests for the rewritten CLI project-bootstrapping behaviour (e.g. via typer's testing docs), which currently has none.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a record to the changelog for this change.", "category"... | null |
apify__crawlee-python__542 | apify/crawlee-python | 542 | defect | 8a3d36903f297103f5763df187f9efdfb9b93311 | 49243db104affb44bbd1b2da17251d8e554835c1 | fix!: merge payload and data fields of Request | ### Description
- We had `data` and `payload` fields on the `Request` model.
- `payload` was not being provided to the HTTP clients, only the `data` field.
- ~In this PR, I'm merging them together, keeping only the `data` field (use the same naming as `HTTPX` & `CurlImpersonate`).~
- In this PR, I'm merging the... | diff --git a/pyproject.toml b/pyproject.toml
index db01852b4a..9432f34fe2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,7 +49,7 @@ apify = { version = ">=2.0.0", optional = true }
beautifulsoup4 = { version = ">=4.12.0", optional = true }
colorama = ">=0.4.0"
cookiecutter = ">=2.6.0"
-curl-cffi = { version... | 8 | 4 | 0 | [{"id": "G0", "claim": "Since this change is breaking, it should wait to be merged until there are more breaking changes or a feature worth the version bump.", "category": "process", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The fill-and-submit-web-form docs example still ... | null |
apify__crawlee-python__55 | apify/crawlee-python | 55 | defect | b8c4a81a6cbc42d34c4c8da0100a67692fa81192 | 7d0ec6e57ad24c8a6b490463c10c0a281c7735ee | feat: AutoscaledPool implementation | - closes #19
The current concurrency model is "launch `desired_concurrency` worker tasks that execute the task function in a loop". Maybe we could achieve simpler and slightly more efficient code if each execution of the task function had its own asyncio task, similarly to the original implementation. Follow-up task... | diff --git a/src/crawlee/_utils/measure_time.py b/src/crawlee/_utils/measure_time.py
new file mode 100644
index 0000000000..f6829dadac
--- /dev/null
+++ b/src/crawlee/_utils/measure_time.py
@@ -0,0 +1,25 @@
+from __future__ import annotations
+
+import time
+from contextlib import contextmanager
+from typing import Ite... | 16 | 11 | 2 | [{"id": "G0", "claim": "TimerResult should be a dataclass rather than a plain class with bare annotations.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "measure_time() lacks a docstring; one should be added.", "category": "documentation", "verd... | null |
apify__crawlee-python__619 | apify/crawlee-python | 619 | defect | 4a07dcccd6259b23ebbafa9cf55b2189899ce6b0 | 3a81edf2930d50e244caf08ab3c461184d492feb | fix: Default ProxyInfo port if httpx.URL port is None |
### Description
Fixes an issue where the string `:None` was being appended to Playwright Proxy configurations.
```
proxy_info: {'server': 'http://p.webshare.io:None', 'username': 'foo', 'password': 'bar'}
```
Neither Firefox or Chrome were able to use a proxy URL like `http://foo:bar@p.webshare.io:80/`, be... | diff --git a/src/crawlee/proxy_configuration.py b/src/crawlee/proxy_configuration.py
index caaac5129c..6ec485fc5e 100644
--- a/src/crawlee/proxy_configuration.py
+++ b/src/crawlee/proxy_configuration.py
@@ -3,7 +3,7 @@
import inspect
from collections import defaultdict
from dataclasses import dataclass
-from typing ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The PR's changed port behavior in new_proxy_info (defaulting the port from the URL scheme and raising ValueError when none can be inferred) has no unit test; reviewers ask for a simple unit test covering it, placed in tests/unit/proxy_configuration/test_new_proxy_info.py.", "category": "testing"... | null |
apify__crawlee-python__621 | apify/crawlee-python | 621 | defect | 0b4cefae189d4ee069c130333b854c5711401cd4 | da77c67a5f6fb4ef41e2eb23c3c575ebe8074175 | feat: Add `always_enqueue` option to bypass URL deduplication | ### Description
This PR implements a new input parameter, always_enqueue, in the Request.from_url constructor. This feature allows users to bypass the request deduplication process, ensuring that each request is always enqueued and processed.
Key Changes:
- Added the always_enqueue parameter to the Request.fro... | diff --git a/src/crawlee/_request.py b/src/crawlee/_request.py
index ee29212f8c..6baed80bd5 100644
--- a/src/crawlee/_request.py
+++ b/src/crawlee/_request.py
@@ -22,6 +22,7 @@
from crawlee._types import EnqueueStrategy, HttpHeaders, HttpMethod, HttpPayload, HttpQueryParams, JsonSerializable
from crawlee._utils.reque... | 3 | 3 | 1 | [{"id": "G0", "claim": "The `unique_key` modification should be written as a full reassignment (`unique_key = f'{unique_key}_{crypto_random_object_id()}'`) instead of an augmented assignment.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The CI... | null |
apify__crawlee-python__812 | apify/crawlee-python | 812 | defect | f6b1a2953b791f5b4f25ba76a7d6e9f7ff8001e9 | 2fedd749d5dd38a908ba1ad157a882909b35b66e | fix: respect user configuration for work with status codes | ### Description
Fixes HTTP status code configuration behavior:
- `additional_http_error_status_codes`: Properly triggers errors and retries when specified status codes are encountered
- `ignore_http_error_status_codes`: Correctly treats specified error status codes as successful responses
### Issues
- Clos... | diff --git a/src/crawlee/_utils/http.py b/src/crawlee/_utils/http.py
index 8b2ea72400..9754d95275 100644
--- a/src/crawlee/_utils/http.py
+++ b/src/crawlee/_utils/http.py
@@ -1,11 +1,6 @@
from __future__ import annotations
-def is_status_code_error(value: int) -> bool:
- """Returns `True` for 4xx or 5xx status ... | 5 | 4 | 2 | [{"id": "G0", "claim": "Questioned whether `is_blocked_status_code` belongs on the `Session` class and suggested it could be moved to `BasicCrawler` instead.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new blocked-status-code handling in `AbstractHt... | null |
apify__crawlee-python__89 | apify/crawlee-python | 89 | defect | 2891d121185cee8bd0372e02a3cab4beaf533f00 | 912480d91fee644e06b2ca12cde6c354e24547e8 | Add `ByteSize` class | ### Issue
- Closes #70 | diff --git a/src/crawlee/_utils/digital_size.py b/src/crawlee/_utils/digital_size.py
new file mode 100644
index 0000000000..ebce0b65a0
--- /dev/null
+++ b/src/crawlee/_utils/digital_size.py
@@ -0,0 +1,133 @@
+from __future__ import annotations
+
+from dataclasses import dataclass
+
+_BYTES_PER_KB = 1024
+_BYTES_PER_MB ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The class and module name \"DigitalSize\" should be renamed because \"digital size\" is not a commonly used term (the thread settles on \"ByteSize\").", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The arithmetic operator... | null |
apify__crawlee__2176 | apify/crawlee | 2,176 | defect | c8c09a54a712689969ff1f6bddf70f12a2a22670 | 0d12445cfc2df3459965c7342155ba180147807d | fix: retry incorrect Content-Type when response has blocked status code | fixes #1994 | diff --git a/packages/http-crawler/src/internals/http-crawler.ts b/packages/http-crawler/src/internals/http-crawler.ts
index fdcfaa2c322e..254a93a18e3b 100644
--- a/packages/http-crawler/src/internals/http-crawler.ts
+++ b/packages/http-crawler/src/internals/http-crawler.ts
@@ -789,7 +789,12 @@ export class HttpCrawler... | 1 | 1 | 0 | [{"id": "G0", "claim": "Access the private sessionPool.blockedStatusCodes field with bracket ('[]') notation instead of suppressing the type error with @ts-expect-error and dot access.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apify__crawlee__2238 | apify/crawlee | 2,238 | defect | 13d5f18cdc3926ad8589ceda598cc6aa616e76da | f091c7946ba9d64fbf4f2b88d9cce56548163964 | feat: check enqueue link strategy post redirect | Closes #2173 | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index f240c187a023..99c992e89102 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -32,6 +32,7 @@ import {
Criti... | 4 | 3 | 0 | [{"id": "G0", "claim": "The enqueueStrategy handling added in the Request constructor should be simplified with the ??= operator (dropping the redundant !this.enqueueStrategy guard) for improved readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", ... | null |
apify__crawlee__2311 | apify/crawlee | 2,311 | defect | 202185bb7acfa4a76014c6865a5b17d90bc6c342 | 6bf4aef099b32e85061abdbe587e15829eac14ec | feat: add Sitemap.tryCommonNames to check well known sitemap locations | Closes #2307 | diff --git a/packages/utils/src/internals/sitemap.ts b/packages/utils/src/internals/sitemap.ts
index 208ad3d5e8b2..9ea4cd28c9ec 100644
--- a/packages/utils/src/internals/sitemap.ts
+++ b/packages/utils/src/internals/sitemap.ts
@@ -1,4 +1,6 @@
import type { Duplex } from 'node:stream';
+import { Writable } from 'node:s... | 6 | 3 | 0 | [{"id": "G0", "claim": "For consistency with createXmlParser, a createTxtParser method returning the parser instance should be added instead of constructing SitemapTxtParser inline.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Sitemap.find shoul... | null |
apify__crawlee__2390 | apify/crawlee | 2,390 | defect | 7dac15cc0bdc7849dc73d3a01afa69a74a3d05f9 | 3b2b07a27914d83540024324bff599554cdd8714 | feat: make `RequestQueue` v2 the default queue, see more on [Apify blog](https://blog.apify.com/new-apify-request-queue/) | Closes #2388 | diff --git a/docs/experiments/request_locking.mdx b/docs/experiments/request_locking.mdx
index f4f00116fff6..e0c5e4b6380a 100644
--- a/docs/experiments/request_locking.mdx
+++ b/docs/experiments/request_locking.mdx
@@ -6,6 +6,20 @@ description: Parallelize crawlers with ease using request locking
import ApiLink from... | 6 | 6 | 4 | [{"id": "G0", "claim": "Renaming the existing `requestLocking` experiment flag to `disableRequestLocking` is a technically breaking change that breaks downstream builds for users who opted into the experiment; the existing flag should be kept (deprecated, with its default flipped so `requestLocking: false` opts out) in... | null |
apify__crawlee__2392 | apify/crawlee | 2,392 | defect | 6c1201960a0b9ed9c8a70ddf55847e4bb71300aa | 56f30f20c096544c87e900b509bd4fefc5f60c1f | feat: better `newUrlFunction` for ProxyConfiguration | Based on changes from #2348 , this PR simplifies the proxy handling in the browser crawlers and makes those more intuitive.
Ready for reviews!
Closes #2065 | diff --git a/packages/browser-crawler/src/internals/browser-crawler.ts b/packages/browser-crawler/src/internals/browser-crawler.ts
index ee1e28e00363..ecf34b8ac0e1 100644
--- a/packages/browser-crawler/src/internals/browser-crawler.ts
+++ b/packages/browser-crawler/src/internals/browser-crawler.ts
@@ -494,25 +494,22 @@... | 5 | 4 | 0 | [{"id": "G0", "claim": "Use the random-id helper from the apify utilities instead of Math.random().toString().slice(2, 6) for the fallback session id.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Remove the if/else branching at the _pickBrowse... | null |
apify__crawlee__2497 | apify/crawlee | 2,497 | defect | a1d1370c3f63c02a61fcc524e7325f6845f6bda7 | 54d8e3055cbb87755b4187d31c555df5108deb6e | fix: Autodetect sitemap filetype from content | - closes #2461 | diff --git a/packages/utils/package.json b/packages/utils/package.json
index 0929232456a4..abf687ad2677 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -52,6 +52,7 @@
"@crawlee/types": "3.10.1",
"@types/sax": "^1.2.7",
"cheerio": "^1.0.0-rc.12",
+ "file-ty... | 4 | 2 | 2 | [{"id": "G0", "claim": "The decompression condition could be simplified to `contentType === 'application/gzip' || sitemapUrl.pathname.endsWith('.gz')` instead of the ternary.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `.gz` suffix is strip... | null |
apify__crawlee__2542 | apify/crawlee | 2,542 | defect | 5e1b5eafe0705328d302e269892e5e3ca42ef278 | 55ae838002a3e60efd42d572e424a8461148cf75 | feat: add `iframe` expansion to `parseWithCheerio` in browsers | Replaces the `iframe` elements with their contents in `<div class="crawlee-iframe-replacement"></div>` element.
Closes #2507 | diff --git a/packages/browser-crawler/src/internals/browser-crawler.ts b/packages/browser-crawler/src/internals/browser-crawler.ts
index 6f514599ac5e..716fcb9cbd2b 100644
--- a/packages/browser-crawler/src/internals/browser-crawler.ts
+++ b/packages/browser-crawler/src/internals/browser-crawler.ts
@@ -342,6 +342,7 @@ e... | 2 | 1 | 0 | [{"id": "G0", "claim": "The line `const contents = await (await frame.contentFrame())?.content();` in parseWithCheerio deserves an intermediate variable for readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The iframe-expansion code ad... | null |
apify__crawlee__2587 | apify/crawlee | 2,587 | defect | 5984ea21c3aa7512c43a52082f10c9f2dc2e9b43 | 6d25310fb88d9872e9b1be0a0bc749e1977c6953 | fix: use `getHTML` in the shadow root expansion | `expandShadowRoots` now does not replace the original content but creates a separate (non-shadow) subtree as a sibling of the original one.
Note that this doesn't duplicate content $\^{[1\]}$ , as the original shadow roots are inaccessible from JS by design. `document.documentElement.outerHTML` returns only the con... | diff --git a/packages/utils/src/internals/general.ts b/packages/utils/src/internals/general.ts
index 221c84d4b9a9..a381b91caf6f 100644
--- a/packages/utils/src/internals/general.ts
+++ b/packages/utils/src/internals/general.ts
@@ -115,7 +115,9 @@ export function expandShadowRoots(document: Document): string {
... | 2 | 2 | 1 | [{"id": "G0", "claim": "Remove the `.only` modifier so the new shadow root expansion test does not exclude all other tests from the suite.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The PR should use the built-in `getHTML` method (instead of the... | null |
apify__crawlee__2689 | apify/crawlee | 2,689 | defect | f3eb99d9fa9a7aa0ec1dcb9773e666a9ac14fb76 | 81b4ec4733fa3ef8015a4c8fd5adbb4a24753609 | fix: `forefront` request fetching in RQv2 | Keeps count of the (locally) `forefront` enqueued requests in the RQv2 instance. Uses this counter to signal the need for new remote RQ reads.
Note that with the current API, we cannot solve this for request queues with multiple clients. The original behavior is retained in such a scenario.
Closes #2669 | diff --git a/packages/core/src/storages/request_provider.ts b/packages/core/src/storages/request_provider.ts
index 75280010ad41..3c66b0423dbe 100644
--- a/packages/core/src/storages/request_provider.ts
+++ b/packages/core/src/storages/request_provider.ts
@@ -44,6 +44,15 @@ export abstract class RequestProvider implemen... | 3 | 2 | 1 | [{"id": "G0", "claim": "`assumedForefrontCount` is incremented unconditionally in `reclaimRequest` when it should only happen for forefront requests.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The inconsistent-forefront-read condition should als... | null |
apify__crawlee__2774 | apify/crawlee | 2,774 | defect | fdd895e94e848c7e5545a2e239f24130d341db61 | feb2b6504a08200f4ec214cbe4595f6610f189b4 | fix(core): type definition of Dataset.reduce | Fixes #2773
I'm seeing type errors and test failures in `./test/core/sitemap_request_list.test.ts` both before and after my change.
This PR currently doesn't add tests to check that types resolve correctly. In the `reduce() uses first value as memo if no memo is provided` test, the result from reduce was previou... | diff --git a/packages/core/src/storages/dataset.ts b/packages/core/src/storages/dataset.ts
index fe0528a96c57..47438fe8491f 100644
--- a/packages/core/src/storages/dataset.ts
+++ b/packages/core/src/storages/dataset.ts
@@ -140,7 +140,7 @@ export interface DatasetDataOptions {
skipEmpty?: boolean;
}
-export inte... | 4 | 2 | 0 | [{"id": "G0", "claim": "The JSDoc must be duplicated onto all of the Dataset.reduce overload signatures, otherwise the method's documentation will not appear in the generated API docs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The overloads m... | null |
apify__crawlee__2775 | apify/crawlee | 2,775 | defect | 680d28121066234ee1f512745a1ecee32f9e440a | 07b371710427e975ab9442dc9c827d5ca790ee09 | fix: Simplified RequestQueueV2 implementation | - closes #2767
- should resolve feedback from #2700 | diff --git a/packages/core/src/storages/request_provider.ts b/packages/core/src/storages/request_provider.ts
index 3be128e011b0..be0e398f2ca7 100644
--- a/packages/core/src/storages/request_provider.ts
+++ b/packages/core/src/storages/request_provider.ts
@@ -66,6 +66,8 @@ export abstract class RequestProvider implement... | 12 | 10 | 3 | [{"id": "G0", "claim": "barjin questions the new head-read rollback: once headData.hadMultipleClients is set (never reset), every forefront head read would lock requests and immediately give the locks up again, and he would rather not do the rollback at all.", "category": "correctness", "verdict": "supported", "priorit... | null |
apify__crawlee__2908 | apify/crawlee | 2,908 | defect | 6b7bb80da59aef149fd6964ecd3c752e34308ec8 | deedc608ece3767c088f435a665ec28b94f76be7 | fix: don't double increment session usage count in `BrowserCrawler` | Changes to the session handling in #1709 caused the same session in `BrowserCrawler` to be marked as good with two different calls. This removes the additional call (keeping only the one in `BasicCrawler`), aligning the `BrowserCrawler` behavior with the other crawler instances.
Closes #2851 | diff --git a/packages/browser-crawler/src/internals/browser-crawler.ts b/packages/browser-crawler/src/internals/browser-crawler.ts
index f15c704789cf..185822fa54df 100644
--- a/packages/browser-crawler/src/internals/browser-crawler.ts
+++ b/packages/browser-crawler/src/internals/browser-crawler.ts
@@ -593,8 +593,6 @@ e... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new test reaches into the private `usageCount` property via @ts-expect-error, which arguably should not be tested directly (the PR being a code-quality nit rather than a user-facing fix); adding a read-only public getter for that property, useful for introspection, would be better.", "catego... | null |
apify__crawlee__2914 | apify/crawlee | 2,914 | defect | 62a9f4036dba92d07547af489ac8b6c7974faa6f | 7b7260ea6675d22817880117337b3377f5a2d8eb | feat: add `TandemRequestProvider` for combined `RequestList` and `RequestQueue` usage | ## Overview
This PR introduces two new components to improve request management in Crawlee:
- `TandemRequestManager`: A provider that seamlessly combines `RequestList` and `RequestQueue`, allowing crawlers to use both sources efficiently.
- `RequestListAdapter`: An adapter that makes `RequestList` compatible with ... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index da07be54fde5..64fe823ee827 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -48,6 +48,10 @@ import {
Sess... | 14 | 13 | 6 | [{"id": "G0", "claim": "startBackgroundTransfer has no awaits inside, so it does not need to be async.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Transferring all RequestList requests to the RequestQueue preemptively in a background promise ... | null |
apify__crawlee__2921 | apify/crawlee | 2,921 | defect | f56c2680437abc050d2590af223dc99c34b0780f | fa411b85d7d8eee38275204ed6a89f3272bb8126 | fix: Fix trailing slash removal in BrowserPool | - closes #2878
| diff --git a/packages/browser-pool/src/anonymize-proxy.ts b/packages/browser-pool/src/anonymize-proxy.ts
index 8c98d3a01a78..31e87baff163 100644
--- a/packages/browser-pool/src/anonymize-proxy.ts
+++ b/packages/browser-pool/src/anonymize-proxy.ts
@@ -16,7 +16,9 @@ export const anonymizeProxySugar = async (
}
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Since the sugar calls new URL() the existing tests would pass even without this fix; the test should also cover a non-http URL such as a socks proxy.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apify__crawlee__3001 | apify/crawlee | 3,001 | defect | f357979b66b4348730ce587edec6dcbb4e1ff26d | d01dd0b1e92e82ade1e4829c2ec5e78c8f644aab | feat: support `KVS.listKeys()` `prefix` and `collection` parameters | Adds `prefix` and `collection` parameters to the `KVS.forEachKey()` interface and implements the `prefix` filter in the `MemoryStorage` implementation of KVS. Note that `MemoryStorage` doesn't currently support the `collection` parameter (it's noop).
Closes #2974 | diff --git a/packages/core/src/storages/key_value_store.ts b/packages/core/src/storages/key_value_store.ts
index c3247a944778..161d4fa29a05 100644
--- a/packages/core/src/storages/key_value_store.ts
+++ b/packages/core/src/storages/key_value_store.ts
@@ -460,22 +460,24 @@ export class KeyValueStore {
options: ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The last-item lookup in the memory-storage listKeys pagination could use `filteredItems.at(-1)` instead of `filteredItems[filteredItems.length - 1]`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
apify__crawlee__3013 | apify/crawlee | 3,013 | defect | af5aac3029d984867e1265d204b442c8600f10bd | 4c51243086d1cfb6576870d174e37375baa1576a | feat: Accept (Async)Iterables in `addRequests` methods | - closes #2980
- the Apify client does not accept iterables yet, so the individual "batches" are still stored in memory
- even considering that, the change should enable reducing memory footprint by passing in an async generator that loads a long list of requests
| diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index e6a79f6f59ff..05bb63eb40f8 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -15,7 +15,7 @@ import type {
... | 6 | 5 | 2 | [{"id": "G0", "claim": "asyncifyIterable could be simplified to just `yield*` the input instead of branching on isAsyncIterable and looping over items.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment about the handwritten validation b... | null |
apify__crawlee__3015 | apify/crawlee | 3,015 | defect | 039b51e924245d8d9cd377266343f070e0388c0f | 2537910ff01639f3e6000e2afa44dc3307569e5f | fix: Do not log 'malformed sitemap content' on network errors in `Sitemap.tryCommonNames` | - closes #2884
| diff --git a/packages/utils/src/internals/sitemap.ts b/packages/utils/src/internals/sitemap.ts
index 6fc04dd09a8f..d551b033f622 100644
--- a/packages/utils/src/internals/sitemap.ts
+++ b/packages/utils/src/internals/sitemap.ts
@@ -186,6 +186,10 @@ export interface ParseSitemapOptions {
* Network timeouts for site... | 4 | 2 | 0 | [{"id": "G0", "claim": "Consider using a custom error class carrying a `type` property instead of the inline `{ error: Error; type: 'fetch' | 'parser' }` object type, unless this is internal-only code.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "As a ... | null |
apify__crawlee__3045 | apify/crawlee | 3,045 | defect | 149a2127d4fc19e67724cb043dd083ca31390516 | 3e948b71893e7d459a42e6e2bdd8bf4045ad87ab | feat: add `maxCrawlDepth` crawler option | Adds `BasicCrawlerOptions.maxCrawlDepth` option. Works with `addRequests` and `enqueueLinks` **called from the crawling context** (those have the current request depth bound and can propagate this value to the new requests).
Closes #2633 | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 2b0c5c431f27..941185dba46b 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -266,6 +266,11 @@ export interface... | 12 | 6 | 0 | [{"id": "G0", "claim": "The `options` field of `BoundEnqueueLinksInternalOptions` shadows the outer `options` parameter and should be renamed (e.g. to `enqueueLinksOptions`) for clarity.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new `ma... | null |
apify__crawlee__3062 | apify/crawlee | 3,062 | defect | e857c175c76f2318c1ac0524a028ce6d2bd78a17 | 79eb032871a542d0047b15898cc91fd0a49a8c5f | fix: don't retire browsers with long-running `pre|postLaunchHooks` prematurely | Stops `browserRetireInterval` ([link here](https://github.com/apify/crawlee/blob/79eb032871a542d0047b15898cc91fd0a49a8c5f/packages/browser-pool/src/browser-pool.ts#L403-L414)) from marking starting browsers as "inactive".
The following snippet shows a crawler with a long-running `preLaunchHook`:
```typescript
co... | diff --git a/packages/browser-pool/src/browser-pool.ts b/packages/browser-pool/src/browser-pool.ts
index c0be47dccff1..e1e1504fae11 100644
--- a/packages/browser-pool/src/browser-pool.ts
+++ b/packages/browser-pool/src/browser-pool.ts
@@ -318,6 +318,7 @@ export class BrowserPool<
pageCounter = 0;
pages = new ... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new `startingBrowserControllers` property lacks documentation; add a JSDoc comment explaining its purpose and relationship to the browser lifecycle states.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The logic combinin... | null |
apify__crawlee__3199 | apify/crawlee | 3,199 | defect | 0f707feafcb390d951945a0079ccfeecc4c567a7 | 74fdaf33949b5b1a27fca2b31a1acc59dc181a81 | feat: store `ProxyInfo` inside `Session` instances | The changes in this PR:
- Extract `ProxyConfiguration` to `BasicCrawler` (related to discussion under https://github.com/apify/crawlee/issues/2917).
- Pass the `ProxyConfiguration` instance to the `SessionPool` for new `Session` object creation
- Store and read the `ProxyInfo` from the `Session` instance instead of... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 0952889c589b..b784f9a7d545 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -14,6 +14,7 @@ import type {
... | 7 | 4 | 1 | [{"id": "G0", "claim": "Sticky proxies cannot be tied to a session because the default session factory calls newProxyInfo() before the session id is known; the id should be pre-generated and passed to both newProxyInfo and Session so the proxy is selected deterministically per session.", "category": "correctness", "ver... | null |
apify__crawlee__3309 | apify/crawlee | 3,309 | defect | 9fc056d756cfec5b66ddef4ad8d2f4aef1e957bf | 048dcbb4bb26693d34ff0dd2bfaa239a9d03790c | fix: log warning on sharing `useState()`, add `id` option to `BasicCrawler` | Adds unique crawler id to the `BasicCrawler` class. Prints a warning on multiple crawlers sharing the state on `useState()`.
There might be more resources shared between different `BasicCrawler` (-subclass) instances - this needs further investigation.
Closes #3024 | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index e44e29ac5ba2..5d60d34cff05 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -387,6 +387,19 @@ export interface... | 4 | 3 | 0 | [{"id": "G0", "claim": "The shared-`useState` warning should use `Log#warningOnce` instead of a hand-rolled static `useStateWarningLogged` flag.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The naming/design of the new `id` option should be re... | null |
apify__crawlee__3337 | apify/crawlee | 3,337 | defect | c292d3e6607addc706fb84b29dc27539416290f3 | 99e97fd63cc48f452ac7e0bfa876a819fbbf0373 | fix(core): ensure `maxCrawlDepth` warning is logged only once | ## Summary
- Refactored enqueueLinks limit logging to distinguish between two scenarios:
- **`enqueueLinks({ limit: X })`**: Now logs once per request handler call (not once per run), providing feedback each time the limit is hit in different handlers
- **`maxCrawlDepth`**: Logs once per crawler run, avoiding spam ... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 4f60768fede0..378d35982d69 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -563,8 +563,7 @@ export class Basi... | 3 | 2 | 1 | [{"id": "G0", "claim": "Gating the enqueueLinks limit warning to once per run doesn't make sense for a non-terminal, per-call message, so it should instead be logged once per enqueueLinks call, ideally with context (e.g. how many links were added and how many were skipped).", "category": "design", "verdict": "supported... | null |
apify__crawlee__3339 | apify/crawlee | 3,339 | defect | 37b66024e486230d6ecc0d899c74e0adb5ba16e9 | 6ef28e3a5b677b4a884c5bf214256cb6769f7b98 | feat(utils): add `discoverValidSitemaps` utility | Related to https://github.com/apify/actor-scraper/issues/220. I'm [developing generic sitemap scraper](https://github.com/apify/actor-scraper/pull/205) and it's going to share a big utility function (main chunk of logic) with wcc - `discoverValidSitemaps`. I've asked @barjin if I could factor it out and he told this ut... | diff --git a/packages/utils/src/internals/iterables.ts b/packages/utils/src/internals/iterables.ts
index c81d6e99d2ed..ed55bde56369 100644
--- a/packages/utils/src/internals/iterables.ts
+++ b/packages/utils/src/internals/iterables.ts
@@ -216,3 +216,56 @@ export function peekableAsyncIterable<T>(iterable: AsyncIterable... | 2 | 2 | 0 | [{"id": "G0", "claim": "The 'extracts sitemap from robots.txt' test should reference a non-default sitemap URL instead of /sitemap.xml, because with the well-known path the example passes even if robots.txt is missing.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1... | null |
apify__crawlee__3352 | apify/crawlee | 3,352 | defect | 9d013342c539dd76783bea3cf807041445d3f8f5 | 4836ea5c779ea871334dc5dc16cb5a1afd14359e | feat: implements async iterators | # PR Summary: Implement Async Iterators for Storage Classes
## Overview
This PR implements async iterators for KeyValueStore and Dataset storage classes, allowing users to iterate over storage items using `for await...of` loops. The implementation follows the pattern established in apify-client-js.
## Changes
... | diff --git a/packages/core/src/storages/dataset.ts b/packages/core/src/storages/dataset.ts
index dc27d09b381c..94377db6eaa5 100644
--- a/packages/core/src/storages/dataset.ts
+++ b/packages/core/src/storages/dataset.ts
@@ -606,6 +606,68 @@ export class Dataset<Data extends Dictionary = Dictionary> {
return cur... | 10 | 7 | 3 | [{"id": "G0", "claim": "Iterating KeyValueStore.listKeys ignores the limit option (e.g. listKeys({ limit: 2 }) yields all 10 items) because isTruncated stays true until the very end of the KVS.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Dataset.... | null |
apify__crawlee__3388 | apify/crawlee | 3,388 | defect | 8cf173eec9f45ac8f2ddf35745b435a67e7d58a2 | 42a47d4ccf439d5a4ef364cbb70c23967b8d63b8 | refactor: use `ContextPipeline` to initialize `BasicCrawler`'s context idiomatically | Extracts all `CrawlingContext` initialization to `ContextPipeline` steps to tighten the control over the `CrawlingContext` contents.
Blocks #3380
| diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index c0255a7ae856..593487c4d25a 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -75,7 +75,7 @@ import type { Reado... | 13 | 11 | 4 | [{"id": "G0", "claim": "The `enqueueLinks` helper is missing from `resultBoundContextHelpers`, so the base crawler's `enqueueLinks` will be used instead and links will not be enqueued correctly in the adaptive crawler; it should be restored.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope"... | null |
apify__crawlee__3392 | apify/crawlee | 3,392 | defect | 8cf173eec9f45ac8f2ddf35745b435a67e7d58a2 | 1be31f250d6277e801f1d70289ac365ff8574b92 | chore: add `discoverValidSitemaps` utility | Rebases #3339 and #3370 on top of `v4` and adds `HttpClient` support for discoverValidSitemaps.
Related to the discussion under https://github.com/apify/actor-scraper/issues/214 | diff --git a/packages/utils/src/internals/iterables.ts b/packages/utils/src/internals/iterables.ts
index c81d6e99d2ed..ed55bde56369 100644
--- a/packages/utils/src/internals/iterables.ts
+++ b/packages/utils/src/internals/iterables.ts
@@ -216,3 +216,56 @@ export function peekableAsyncIterable<T>(iterable: AsyncIterable... | 6 | 2 | 1 | [{"id": "G0", "claim": "The optional chaining on `httpClient?.sendRequest` in `urlExists` is unnecessary because httpClient always defaults to a FetchHttpClient, and it could confuse readers; remove it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai... | null |
apify__crawlee__3411 | apify/crawlee | 3,411 | defect | 9d6732e01ca30edfbc5b175ac8f4301429f6bd64 | 41759334091a98b2634062d804822e3164fd3423 | fix: Fix file download hang | - split from #3325 after review (https://github.com/apify/crawlee/pull/3325#issuecomment-3885022060)
| diff --git a/packages/http-crawler/src/internals/file-download.ts b/packages/http-crawler/src/internals/file-download.ts
index 704a459f2888..3549fd183fa0 100644
--- a/packages/http-crawler/src/internals/file-download.ts
+++ b/packages/http-crawler/src/internals/file-download.ts
@@ -1,4 +1,4 @@
-import { Transform } fro... | 1 | 1 | 1 | [{"id": "G0", "claim": "Calling Readable.fromWeb on the locked response body will throw, because Readable.fromWeb tries to acquire the stream's reader, which is impossible while the stream is locked.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apify__crawlee__3413 | apify/crawlee | 3,413 | defect | adf3daeb0b3000124817b1b2011b2196342e8715 | f2ad5d2b01ff77c1c13f9125457763785c00b2db | perf: add lazyIterablePromise to kvs iterators | iterator path and promise path now does not share first page:
- promise is always bulk
- iterator is always sequential
Downside is response is not "real" promise but object with promise-like functions (then. catch, finally). | diff --git a/packages/memory-storage/src/resource-clients/key-value-store.ts b/packages/memory-storage/src/resource-clients/key-value-store.ts
index ecf8148b4e87..f8e2cb82720b 100644
--- a/packages/memory-storage/src/resource-clients/key-value-store.ts
+++ b/packages/memory-storage/src/resource-clients/key-value-store.... | 2 | 2 | 0 | [{"id": "G0", "claim": "The variable firstPageValuesPromise should be renamed (suggested getFirstPageValues) because it now holds an async function, not a Promise.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The variable firstPageEntriesPromi... | null |
apify__crawlee__3418 | apify/crawlee | 3,418 | defect | 070c258a58260789311ba49d073d753936c4c16f | e5ec730c968a3b96bf0b24a05fe28669b1a71661 | feat: add `ignoreProxyCertificate` option for the internal `proxy-chain` instance | Adds `ignoreProxyCertificate` option to `launchContext`. When set to `true`, this ignores TLS issues with the upstream HTTPS proxy.
Closes #3369 | diff --git a/packages/browser-crawler/src/internals/browser-launcher.ts b/packages/browser-crawler/src/internals/browser-launcher.ts
index 1b68b1bb3353..e20eb73487b8 100644
--- a/packages/browser-crawler/src/internals/browser-launcher.ts
+++ b/packages/browser-crawler/src/internals/browser-launcher.ts
@@ -67,6 +67,12 @... | 4 | 4 | 1 | [{"id": "G0", "claim": "The unrelated formatting change to key-value-store.ts should be reverted or moved to a separate PR so the PR stays focused on ignoreProxyCertificate.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "AnonymizeProxySugarOptio... | null |
apify__crawlee__3433 | apify/crawlee | 3,433 | defect | 1f31779685cccc9fd987eb6a9602c994b3c02fcf | d3c1b94154d801cb287a891b87ccc028368c56b0 | fix: parse proxy URLs correctly when using `useIncognitoPages` | - [x] Fix `normalizeProxyOptions` in `playwright-controller.ts` to use `${url.protocol}//${url.host}` instead of `url.origin`
- [x] Fix `normalizeProxyOptions` in `puppeteer-controller.ts` to use `${url.protocol}//${url.host}` instead of `url.origin`
- [x] Fix `normalizeProxyOptions` in `stagehand-controller.ts` to use... | diff --git a/packages/browser-pool/src/playwright/playwright-controller.ts b/packages/browser-pool/src/playwright/playwright-controller.ts
index a04d007ca54c..06416aa5a075 100644
--- a/packages/browser-pool/src/playwright/playwright-controller.ts
+++ b/packages/browser-pool/src/playwright/playwright-controller.ts
@@ -2... | 1 | 1 | 0 | [{"id": "G0", "claim": "The four separate normalizeProxyOptions tests added in the pull request could be made shorter and much more readable using test.each.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apify__crawlee__3464 | apify/crawlee | 3,464 | defect | 2cf9c1cd9fca21ea5113ee1404dae3a6a652fec0 | 5856195fc55784f329dd97698b4203f43d34df8a | fix: using GET for candidate checks - sitemaps | New case discovered.
This fix parallelizes sitemap candidate probing in `discoverValidSitemaps` for sitemaps.
Candidate checks are now executed concurrently and collected, so a slow/failing candidate no longer blocks others. This removes avoidable discovery delays while preserving sitemap detection semantics.
... | diff --git a/packages/utils/src/internals/sitemap.ts b/packages/utils/src/internals/sitemap.ts
index cc74ca776219..8792911eb762 100644
--- a/packages/utils/src/internals/sitemap.ts
+++ b/packages/utils/src/internals/sitemap.ts
@@ -507,7 +507,7 @@ export async function* discoverValidSitemaps(
const urlExists = asyn... | 1 | 1 | 1 | [{"id": "G0", "claim": "urlExists() should stay a lightweight HEAD check; fetching with GET downloads the entire (potentially hefty) sitemap resource, and misbehaving servers should instead be handled with stricter timeouts or parallel processing.", "category": "performance", "verdict": "supported", "priority": "P1", "... | null |
apify__crawlee__3478 | apify/crawlee | 3,478 | defect | 846e9cad9fe10083cdd8a830b98f486e97e3409d | b856484a2c358c5219ee9399336d660337b54d35 | feat: drop `useSessionPool` option, make `SessionPool` required in all crawlers | Drops the `useSessionPool` option from the `BasicCrawler` constructor. Since `Session` now carries proxy information (and should eventually include the cookies too), we now expect it to be always defined.
Closes #3280 | diff --git a/docs/guides/proxy_management_session_cheerio.ts b/docs/guides/proxy_management_session_cheerio.ts
index bb19a5b88d35..440d10cf8946 100644
--- a/docs/guides/proxy_management_session_cheerio.ts
+++ b/docs/guides/proxy_management_session_cheerio.ts
@@ -5,7 +5,6 @@ const proxyConfiguration = new ProxyConfigura... | 2 | 2 | 0 | [{"id": "G0", "claim": "The `persistCookiesPerSession ?? true` default should be handled in the options destructuring for consistency with the codebase's usual pattern (requested for both HttpCrawler and BrowserCrawler).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ... | null |
apify__crawlee__3489 | apify/crawlee | 3,489 | defect | 846e9cad9fe10083cdd8a830b98f486e97e3409d | b35436d5bbcc6b3886cd7e2acedf262a401131f1 | refactor: use `BasicCrawler` session in browser launch context | Before, `BrowserCrawler` instances could generate a new `Session`, overwriting the one created in `BasicCrawler`'s pipeline. The changes from this PR enforce the use of the `BasicCrawler` session, aligning the `BrowserCrawler` behaviour with `HttpCrawler` and `AdaptivePlaywrightCrawler`.
Prerequisite: #3478 | diff --git a/docs/guides/proxy_management_session_cheerio.ts b/docs/guides/proxy_management_session_cheerio.ts
index bb19a5b88d35..440d10cf8946 100644
--- a/docs/guides/proxy_management_session_cheerio.ts
+++ b/docs/guides/proxy_management_session_cheerio.ts
@@ -5,7 +5,6 @@ const proxyConfiguration = new ProxyConfigura... | 3 | 3 | 1 | [{"id": "G0", "claim": "The JSDoc for `ignoreTlsErrors` in `BrowserPoolNewPageOptions` says it is only applied when a new browser is launched (not when reusing an existing one), but it is also applied to pages created in reused browsers, so the comment should be updated to say it applies at both levels.", "category": "... | null |
apify__crawlee__3499 | apify/crawlee | 3,499 | defect | 697dcf23c137a9aa57c4f9ef76e2902ee583fbba | 19a0f09405a9c02e38af1a97522ff7c0c8c270a6 | feat: share `SessionPool` instance between crawlers | `BasicCrawler` and subclasses now accept `sessionPool` option for passing a pre-initialized `SessionPool` instance. This is mutually exclusive with `sessionPoolOptions`.
`SessionPool` instances now do not share the persistence keys (similar to e.g. `Statistics`).
Closes #3445 | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index a7d28350257b..ef98574a43de 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -310,8 +310,17 @@ export interface... | 6 | 5 | 1 | [{"id": "G0", "claim": "The JSDoc says \"Session pool persists it's state\" where it should say \"its state\" (no apostrophe).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The new `sessionPool` option is only validated as a generic object, so ... | null |
apify__crawlee__3511 | apify/crawlee | 3,511 | defect | f6dac27230620a5e17bf7ab4a657e22ebdb11022 | b9077ffb95ac90499ec2f56415177ccf5bdb2c18 | refactor: resolve last direct @apify/log calls (#3459) | - Remove direct @apify/log imports from utils, memory-storage, http-client, and stagehand-crawler
- Use callback options for system-info logging in cpu-info and memory-info
- Use serviceLocator.getLogger() in context_pipeline a... | diff --git a/packages/basic-crawler/package.json b/packages/basic-crawler/package.json
index 053bf35ae644..45e9d443a7ff 100644
--- a/packages/basic-crawler/package.json
+++ b/packages/basic-crawler/package.json
@@ -39,7 +39,6 @@
"access": "public"
},
"dependencies": {
- "@apify/log": "^2.5.18"... | 4 | 4 | 2 | [{"id": "G0", "claim": "The service locator should drop the fallbackLog mechanism where possible and use this.getLogger() consistently, instead of half of its methods logging one way and half the other.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Base... | null |
apify__crawlee__3513 | apify/crawlee | 3,513 | defect | f6dac27230620a5e17bf7ab4a657e22ebdb11022 | 6b32a790c76a0ffb8bbb3b0994a921d43d3c2774 | feat: lazy-initialize `SessionPool`, drop `SessionPool.open()` | This PR removes the static `SessionPool.open()` method. Until the `new SessionPool()` instance has been interacted with, it doesn't access any storage. Once the user (or another Crawlee component) calls one of the `SessionPool` async methods, the `SessionPool` is automatically initialized.
This simplifies usage in e... | diff --git a/docs/guides/session_management_standalone.ts b/docs/guides/session_management_standalone.ts
index c6fa33d82170..5062a8a871d6 100644
--- a/docs/guides/session_management_standalone.ts
+++ b/docs/guides/session_management_standalone.ts
@@ -5,8 +5,7 @@ const sessionPoolOptions = {
maxPoolSize: 100,
};
... | 7 | 4 | 2 | [{"id": "G0", "claim": "Converting usableSessionsCount/retiredSessionsCount into async methods and getState() into async breaks existing consumers; consider keeping the sync accessors (deprecated, computed from the in-memory sessions array) for a transition period alongside the new async variants.", "category": "design... | null |
apify__crawlee__3517 | apify/crawlee | 3,517 | defect | 340252af44620f65e23885f0581c54ed9c90ee7a | b52e26f6bb4fe5c64bf4d4cf768df8acc95df017 | fix: clean-up cookie handling precedence rules | `BaseHttpClient.applyCookies()` now merges cookies from the `Session` jar with `Cookie` header already present on the request. Header cookies take precedence over jar cookies with the same name.
Closes #2744 | diff --git a/docs/upgrading/upgrading_v4.md b/docs/upgrading/upgrading_v4.md
index 862f8023b7ea..2166992f56d4 100644
--- a/docs/upgrading/upgrading_v4.md
+++ b/docs/upgrading/upgrading_v4.md
@@ -48,6 +48,7 @@ The crawler following options are removed:
- `BrowserCrawler._handleNavigation` (protected)
- `HttpCrawler.us... | 2 | 1 | 0 | [{"id": "G0", "claim": "The word \"manually\" in the new cookie precedence docs paragraph is misspelled as \"manuall\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks whether `Promise.all` should be `Promise.allSettled` so that o... | null |
apify__crawlee__3518 | apify/crawlee | 3,518 | defect | cd55e00b7d8c3ffab5c52f628ff2b8717d60765d | 83f3ae09d3f319485ccfa0b97946a3e71e6daf70 | feat: allow binding a Session instance to a Request | Adds a `sessionId?: string` field to `Request`. If this is set, `BasicCrawler` will fetch this given session when processing the request (and will fail if the session is not present in the `SessionPool`).
This PR also adds a `sessionId` parameter to the `enqueueLinks` (and other?) helper functions. If the request-ad... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 53e804fba268..2dfc2cf529f6 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -1097,6 +1097,20 @@ export class B... | 4 | 1 | 1 | [{"id": "G0", "claim": "Throwing ContextPipelineInitializationError when the requested sessionId is not in the SessionPool may be wrong, since there can be valid reasons for the session to be missing, and it is unclear whether the user is expected to recover from it in an error handler.", "category": "design", "verdict... | null |
apify__crawlee__3531 | apify/crawlee | 3,531 | defect | 08c98cf52de5fc227afa97b2ff71c52bbe832ba3 | a50afb62ddc8e36447055042531b03e1d4428b95 | fix: Prevent accidental request dropping with `maxRequestsPerCrawl` | - closes #3153
- core issue: `maxRequestsPerCrawl` and `enqueueLinks({ limit })` pre-truncated request lists before sending them to the request queue. Duplicate URLs consumed budget slots, starving actual new URLs.
- **Fix**: Instead of guessing upfront which requests will be new, let the request queue tell us.
... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 3ff8e2c63421..850dda046f97 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -1202,7 +1202,6 @@ export class Ba... | 4 | 3 | 1 | [{"id": "G0", "claim": "The JSDoc for `maxNewRequests` should mention that setting it effectively forces `waitForAllRequestsToBeAdded`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When `maxNewRequests` is set, `buildResult` drains a freshly cre... | null |
apify__crawlee__3557 | apify/crawlee | 3,557 | defect | 7159a13e0fb13661b9d6fa8cae1a0713bdbfb4eb | e443a805b633f3538e29b78c0dc35a6654af7d0e | feat(utils): add sitemapFilter option to parseSitemap | ## Motivation
When working with sitemap index files, `parseSitemap` currently follows all child sitemaps unconditionally. Sometimes sitemap indexes contain hundreds of child sitemaps, for instance, a child sitemap for every month going back 15 years (e.g., `/articles-2010-01.xml` through `/articles-2026-03.xml`). If y... | diff --git a/packages/utils/src/internals/sitemap.ts b/packages/utils/src/internals/sitemap.ts
index d74eda26445f..74c888676b62 100644
--- a/packages/utils/src/internals/sitemap.ts
+++ b/packages/utils/src/internals/sitemap.ts
@@ -194,6 +194,13 @@ export interface ParseSitemapOptions {
* @default true
*/
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new option `sitemapFilter` should be renamed (e.g. to `nestedSitemapFilter`) to convey that it filters nested sitemap URLs rather than page URLs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apify__crawlee__3578 | apify/crawlee | 3,578 | defect | 1d4f6b9ca44b8224f14584c337bd80209eea3819 | f56a7599734c8499f0d5c6359aa0270fdea8406f | fix: honor custom respectRobotsTxtFile userAgent in enqueueLinks | Closes #3576
- core issue: #3226 added custom `respectRobotsTxtFile.userAgent` support for crawler-level robots checks, but `enqueueLinks()` still evaluated child URLs with the default `*` agent.
- this made `addRequests()` and `enqueueLinks()` disagree on the same robots.txt rules when a custom user-agent was configu... | diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 850dda046f97..d3493d33d0e9 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -1703,6 +1703,9 @@ export class Ba... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new regression test asserts strict visitation order with toEqual while the crawler runs at the AutoscaledPool default maxConcurrency (200), which can make visitedUrls ordering nondeterministic and flaky; set maxConcurrency: 1 for this crawler instance or assert without relying on order.", "c... | null |
apify__crawlee__3584 | apify/crawlee | 3,584 | defect | ffff3347eb225d77e0ecbfeab5c8028718807c29 | 4f69d63f7d6107f8fe434697a0e35e02d0ad8432 | refactor!: Rename StorageManager to StorageInstanceManager and use it to centralize storage instance caching | - depends on #3570
- closes #3592 | diff --git a/packages/core/src/crawlers/crawler_commons.ts b/packages/core/src/crawlers/crawler_commons.ts
index 25de68e03961..dea31efd8f59 100644
--- a/packages/core/src/crawlers/crawler_commons.ts
+++ b/packages/core/src/crawlers/crawler_commons.ts
@@ -9,7 +9,7 @@ import type { Session } from '../session_pool/session... | 13 | 7 | 2 | [{"id": "G0", "claim": "The author finds storage_instance_manager.ts still 'pretty vibey' and would like to make it less so (clean up the whole file).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rewritten tests may no longer test BasicCra... | null |
apify__crawlee__3586 | apify/crawlee | 3,586 | defect | 930b2ef4f821d0d7d21c2cb9a1f91c257a061680 | c4338c5055d20583b2e0c3d0cec407eb7603f539 | refactor: move `describe` helper to `@crawlee/utils` as `inspectValue` | # Summary
Extracts the ad-hoc `describe()` helper that was inlined inside `ServiceConflictError` into a shared, reusable utility exp... | diff --git a/packages/core/src/errors.ts b/packages/core/src/errors.ts
index 5edf59c8af0f..517fb34ebde3 100644
--- a/packages/core/src/errors.ts
+++ b/packages/core/src/errors.ts
@@ -1,3 +1,5 @@
+import { describe } from '@crawlee/utils';
+
/**
* Errors of `NonRetryableError` type will never be retried by the crawle... | 3 | 3 | 0 | [{"id": "G0", "claim": "The exported helper's name `describe` is too vague/generic for a public symbol and should be renamed to something less generic.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The exported helper should be marked as `@inte... | null |
apify__crawlee__3587 | apify/crawlee | 3,587 | defect | 930b2ef4f821d0d7d21c2cb9a1f91c257a061680 | 1c847c4d7ac588ee08e8419d165bab2d5c69bbaf | feat(`session-pool`): add `sessionReuseStrategy` option | Adds `SessionPoolOptions.sessionReuseStrategy` option for better control over `Session` retrieval.
Closes https://github.com/apify/crawlee/issues/3270 | diff --git a/docs/guides/session_management.mdx b/docs/guides/session_management.mdx
index ad0eca80e96e..4bd069b14cde 100644
--- a/docs/guides/session_management.mdx
+++ b/docs/guides/session_management.mdx
@@ -24,8 +24,8 @@ The main benefit of using Session pool is that we can filter out blocked or non-
so our actor ... | 4 | 3 | 3 | [{"id": "G0", "claim": "The `round-robin` option's JSDoc says it 'only creates new ones when all are retired', but the implementation (and tests) create new sessions until `maxPoolSize` is reached and then cycle, so the JSDoc should be adjusted to match the actual behavior so the API docs are not misleading.", "categor... | null |
apify__crawlee__3590 | apify/crawlee | 3,590 | defect | fc39e1a51dfae1d8b3c3b25e1da213f8b9187c97 | 2346f27320390f3110ed629e12c2554577d63f43 | fix: prevent iframe expansion failure on pages with Trusted Types CSP | Pages enforcing a Trusted Types Content Security Policy (e.g. Google Sheets) block any browser-side HTML string assignment — including innerHTML and DOMParser.parseFromString. The iframe expansion in parseWithCheerio used frame.evaluate() to inject iframe content into the browser DOM, which was silently blocked by CSP,... | diff --git a/packages/playwright-crawler/src/internals/utils/playwright-utils.ts b/packages/playwright-crawler/src/internals/utils/playwright-utils.ts
index a3c921b5d6d3..a06736eb7908 100644
--- a/packages/playwright-crawler/src/internals/utils/playwright-utils.ts
+++ b/packages/playwright-crawler/src/internals/utils/p... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a diagnostic warning when the Playwright and Cheerio iframe views of the page diverge — the author's suggestion of comparing src(doc) per iframe was superseded by the reviewer's simpler alternative of logging a warning when the two iframe arrays have different lengths.", "category": "correct... | null |
apify__crawlee__3605 | apify/crawlee | 3,605 | defect | ffff3347eb225d77e0ecbfeab5c8028718807c29 | 77315f61aa6ad4145fb19621d73e6050c189ef9c | feat: reuse `Sessions` correctly in `BasicCrawler` | Makes BasicCrawler (and its subclasses) reuse `Session` instances according to the `sessionReuseStrategy`. Before, the `BasicCrawler` would create a single-use Session for each Request unless instructed otherwise (e.g., via `request.sessionId`).
Refactors small bits around the `Session` lifecycle in `BasicCrawler`.
... | diff --git a/docs/guides/proxy_management.mdx b/docs/guides/proxy_management.mdx
index 70dce2f72f9b..bc7253aa6ec9 100644
--- a/docs/guides/proxy_management.mdx
+++ b/docs/guides/proxy_management.mdx
@@ -83,7 +83,7 @@ The `ProxyConfiguration` class allows you to provide a custom function to pick a
```javascript
cons... | 5 | 3 | 2 | [{"id": "G0", "claim": "The new warning says `proxyConfiguration` is ignored when an external `sessionPool` is provided, but `this.proxyConfiguration` is still set and exposed on the crawler, contradicting the property docs; it asks to clear `this.proxyConfiguration` in that case or adjust the warning/docs to match act... | null |
apify__crawlee__3631 | apify/crawlee | 3,631 | defect | 712a5d1f20e67f3ff9d4ffee6da073045418770d | c3d5b389ae92be6259fb7e756e571da9d732d15f | refactor!: treat session errors as regular request retries | Drops the `maxSessionRotation` option and related tooling, simplifying the request retry logic.
Blocked requests now get retried the same way as any other failing requests.
Closes https://github.com/apify/crawlee/issues/3502 | diff --git a/docs/upgrading/upgrading_v4.md b/docs/upgrading/upgrading_v4.md
index cbd75238ef1d..31e4ed36560f 100644
--- a/docs/upgrading/upgrading_v4.md
+++ b/docs/upgrading/upgrading_v4.md
@@ -198,6 +198,10 @@ await crawler.run([{ url: 'https://example.com', sessionId: 'basic' }]);
More complex routing (more tiers... | 2 | 2 | 1 | [{"id": "G0", "claim": "SessionError now triggers session.retire() while the surrounding error flow also calls session.markBad(), so a session failure counts as two failed uses per attempt and can prematurely hit maxUsageCount/retire logic and skew session statistics; consider skipping markBad() for SessionError.", "ca... | null |
apify__proxy-chain__124 | apify/proxy-chain | 124 | defect | 6037956cf814e1533272d3facfdc77e6ad4e8f93 | cfc8c43f9455f9f7f1bd3d7aee191c6106e3bae4 | parseUrl: return standard ports for http(s) when port is not specified | Proxy url returns standard ports for few protocols (see https://nodejs.org/api/url.html#url_url_port) when no port is explicitly specified.
Removed tests which needlesly require the standard port
- in `createTunnel`, only the parsed url is used in the end, so it should be ok
- in `anonymizeProxy`, the raw (unpar... | diff --git a/src/tools.js b/src/tools.js
index 32e8c0ae..c1e29208 100644
--- a/src/tools.js
+++ b/src/tools.js
@@ -79,6 +79,16 @@ const bulletproofDecodeURIComponent = (encodedURIComponent) => {
}
};
+// Ports returned by `parseUrl` when port is not explicitly specified.
+// Values are based on node docs: https... | 3 | 2 | 1 | [{"id": "G0", "claim": "The reviewer asks whether it is worth adding the SOCKS default port (1080) to STANDARD_PORTS_BY_PROTOCOL, citing RFC 1928.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "unclear"}, {"id": "G1", "claim": "The new default-port behavior of parseUrl should be mentioned i... | null |
apify__proxy-chain__146 | apify/proxy-chain | 146 | defect | d27e938aa45631ad63c7f03e8f9d59e8da309624 | 7e4cf87614fdfa804c1f6c68609de037165c66e2 | Fix event emitter memory leak | Fixes #130
The issue is that `proxy-chain` assumes each request is a new socket (`HandlerBase`). Unfortunately in case of `keep-alive`, this isn't true, so the events keep stacking. No matters if this is HTTP or HTTPS. The memory leak occurs only when there are multiple handler for the same socket - IOW those are **... | diff --git a/demo.js b/demo.js
new file mode 100644
index 00000000..446e045e
--- /dev/null
+++ b/demo.js
@@ -0,0 +1,31 @@
+// npm run build && node --trace-warnings demo.js
+
+const ProxyChain = require('.');
+const net = require('net');
+
+const server = new ProxyChain.Server({
+ port: 8080,
+});
+
+server.server.p... | 3 | 2 | 0 | [{"id": "G0", "claim": "Add a comment to `detach()` explaining what it does and how it differs from `close`, or drop the function and put the `off()` calls in `close` instead.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add the same explanatory... | null |
apify__proxy-chain__158 | apify/proxy-chain | 158 | defect | 678ace0707b1f5c9e90a135be05aa1e6aff2ca3d | f66a282e6a9dc377a55bd8c82eb7069540ebf16f | wip: simplify tunnel | #### this PR
- [x] simplify `TcpTunnel` https://blog.apify.com/tunneling-arbitrary-protocols-over-http-proxy-with-static-ip-address-b3a2222191ff/
- [x] turn the 5 parameters of `direct` and `chain` into object
#### [wip: simplify forward](https://github.com/apify/proxy-chain/pull/153)
- [x] remove babel
- [x... | diff --git a/src/chain.js b/src/chain.js
index a8d5bb52..e0a70ac7 100644
--- a/src/chain.js
+++ b/src/chain.js
@@ -2,14 +2,10 @@ const http = require('http');
const { getBasic } = require('./utils/get_basic');
/**
- * @param {http.ClientRequest} request
- * @param {net.Socket} source
- * @param {buffer.Buffer} head... | 9 | 8 | 3 | [{"id": "G0", "claim": "The condensed `@param {*} options` JSDoc on chain should document each option (as comments on a future interface) because the properties are hard to understand and maintain without them.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",... | null |
apify__proxy-chain__159 | apify/proxy-chain | 159 | defect | 28b4e0b5b48a0fdeb50bf8d8188cd195c258d002 | 2c93c371ea125644b4ba944283cd20813776deac | wip: simplify server | #### this PR
- [x] simplify server
- [x] re-enable two skipped tests from #153
#### [wip: simplify forward](https://github.com/apify/proxy-chain/pull/153)
- [x] remove babel
- [x] simplify forward handler
- [x] added https support
- [ ] test
- [x] require node.js 14
- [ ] ~~skipped 2 tests (will re-ena... | diff --git a/src/chain.js b/src/chain.js
index e1aad3ec..03a6bce8 100644
--- a/src/chain.js
+++ b/src/chain.js
@@ -1,4 +1,5 @@
const http = require('http');
+const { countTargetBytes } = require('./utils/count_target_bytes');
const { getBasic } = require('./utils/get_basic');
/**
@@ -20,6 +21,8 @@ const chain = ({... | 8 | 8 | 1 | [{"id": "G0", "claim": "Set this.name via RequestError.name instead of hardcoding the 'RequestError' string literal.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Move the connection-registration logic out of onConnection into a separate method... | null |
apify__proxy-chain__285 | apify/proxy-chain | 285 | defect | e4367ce73f16fd0d76cf617e80dd7bf541305fe5 | 8281bdfac876a7bbdf455a0a71ea6891194c521d | feat: custom connect http server | This would enable to use CONNECT for SERP requests. Currently using [`hpagent`](https://github.com/delvedor/hpagent) doesn't work when doing SERPs, because it only supports CONNECT proxying.
/cc @AndreyBykov | diff --git a/package.json b/package.json
index 36794044..c59b868e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "proxy-chain",
- "version": "2.0.7",
+ "version": "2.1.0",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstre... | 2 | 2 | 0 | [{"id": "G0", "claim": "Byte counting is commented out in the new custom CONNECT handler (countTargetBytes is disabled there), and it is unresolved whether transferred bytes should be tracked on that path.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T... | null |
apify__proxy-chain__545 | apify/proxy-chain | 545 | defect | a1ac3f287e895270f4e34306ac754a62a9848fa4 | 6b39b600f56aeb31f669a1287d184314757de306 | fix: correctly validate protocols in anonymize_proxy | This PR fixes validation of URL protocol for `anonymize_proxy.ts` | diff --git a/package.json b/package.json
index 8a9af319..1dbf15a7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "proxy-chain",
- "version": "2.5.1",
+ "version": "2.5.2",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstre... | 2 | 1 | 1 | [{"id": "G0", "claim": "Add a test that some SOCKS protocol actually works through anonymize_proxy, since the PR replaced the SOCKS-throws tests with an https-only test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new invalid-protocol error messa... | null |
apify__proxy-chain__583 | apify/proxy-chain | 583 | defect | bad3172a5b2d1da37e602f47b26356fca530827d | 097248b943c416f871000461fa9d14a440f99f9a | test: add ignoreUpstreamProxyCertificate tests | Add tests for `ignoreUpstreamProxyCertificate` proxy chain server `prepareRequestFunction` option. | diff --git a/test/server.js b/test/server.js
index 9086b437..2ce0c4f5 100644
--- a/test/server.js
+++ b/test/server.js
@@ -1481,6 +1481,93 @@ it('supports pre-response CONNECT payload', (done) => {
});
});
+describe('supports ignoreProxyCertificate', () => {
+ const serverOptions = {
+ key: sslKey,
+ ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The version field in package.json should be bumped to 2.5.9.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It would be nice to add a comment describing how the test works.", "category": "documentation", "verdict": "suppo... | null |
apiman__apiman__1011 | apiman/apiman | 1,011 | defect | b24bd913117d43756cb706b9fd6478ddfcbb6a47 | d4c0bdcee542c3eb795ae2ba5f0a59ff3d496a1c | test: Autostart Elastic Testcontainer for Vert.x ES integration tests | Rather than relying on a background ES instance, a factory manages the lifecycle of an Elasticsearch Testcontainer with randomised ports for the Vert.x Gateway integration testsuite.
This means that the environment does not need an ES instance running when executing these integration tests from Maven, IDE, CI, etc.
... | diff --git a/common/es/src/main/java/io/apiman/common/es/util/AbstractClientFactory.java b/common/es/src/main/java/io/apiman/common/es/util/AbstractClientFactory.java
index 0371439aaa..56961416e9 100644
--- a/common/es/src/main/java/io/apiman/common/es/util/AbstractClientFactory.java
+++ b/common/es/src/main/java/io/ap... | 1 | 1 | 1 | [{"id": "G0", "claim": "The default port 9200 that NumberUtils.toInt fell back to for client.port should be kept, instead of being removed so an unset port silently becomes 0.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apiman__apiman__1117 | apiman/apiman | 1,117 | defect | 5348a5d57e623ca67cbc50de89eb74ee8cc3d2a5 | 6acb909ad5e1b433e6bb414fa2ccf33860706609 | build(deps): bump OkHttp from 2.4.0 to 2.7.5 | This is a slightly risky update because the internal OkHttp model was changed quite significantly between 2.4.0 and 2.7.5 to be more streaming-oriented. I'm not 100% sure I've selected appropriately equivalent methods. We should test this well before merging in.
The next stage will be bumping all the way up to the v... | diff --git a/gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/HttpConnectorFactory.java b/gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/HttpConnectorFactory.java
index 433fb71769..e4b6fe2f36 100644
--- a/gateway/platforms/servlet/src/main/ja... | 1 | 1 | 0 | [{"id": "G0", "claim": "The in-code comment above disconnect() should be updated because the method no longer calls disconnect().", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}] | null |
apiman__apiman__1121 | apiman/apiman | 1,121 | defect | 8f6b382b74fbb882e8b13dc09d83bc9bff0bf802 | a0227ab34abd92b6eae3caa4f1023dca4ca3be8e | chore(es): allow optional use of Amazon open distro images | This should allow to switch between Amazon OpenDistro and the official elastic images for the test runs | diff --git a/common/es/src/main/java/io/apiman/common/es/util/EsConstants.java b/common/es/src/main/java/io/apiman/common/es/util/EsConstants.java
index 35dcf79fe1..d3065b5ad1 100644
--- a/common/es/src/main/java/io/apiman/common/es/util/EsConstants.java
+++ b/common/es/src/main/java/io/apiman/common/es/util/EsConstant... | 3 | 2 | 1 | [{"id": "G0", "claim": "EsConstants should import java.util.Properties and use the short name instead of the fully-qualified java.util.Properties / java.io.InputStream names.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Declaring the testconta... | null |
apiman__apiman__2190 | apiman/apiman | 2,190 | defect | 55545eb84e8bfc8df28ee8d15075e640ada4b8a5 | 65e4fca0fcdb4977e973c7abf44779d5c58e7340 | feat(notifications): add email to user on api signup | Add a new notification that is sent to the user who signs up to an API. This is sent in addition to the approval notifications to all plan admins.
Closes: #1852 | diff --git a/distro/conf/src/main/resources/notifications/email/notification-template-index.json b/distro/conf/src/main/resources/notifications/email/notification-template-index.json
index 1cc56e3642..87cd0338dc 100644
--- a/distro/conf/src/main/resources/notifications/email/notification-template-index.json
+++ b/distr... | 1 | 1 | 1 | [{"id": "G0", "claim": "Tests should be added in DefaultTemplatesTest for the new contract-request-user templates (and the previous contribution's untested templates) so that defective templates are caught before they are run in production.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "in... | null |
apiman__apiman__2543 | apiman/apiman | 2,543 | defect | db3f5ea764637f0352c2ad4a5402135ad2c512e4 | 0da02f2b462f311360902f754c4140484d35292e | refactor(manager-api): change cacheKey for api definition rewrite cache | Use `modifiedOn` as key to make sure that we refresh the cache once the definition is updated. Otherwise definition changes are not directly available after an update. Also this fixes caching as the cacheKey class did not override equals/hashCode.
Closes: #2542
See: https://github.com/ben-manes/caffeine/discuss... | diff --git a/manager/api/rest-impl/src/main/java/io/apiman/manager/api/schema/SchemaRewriterService.java b/manager/api/rest-impl/src/main/java/io/apiman/manager/api/schema/SchemaRewriterService.java
index db256316fb..9f2fd513c6 100644
--- a/manager/api/rest-impl/src/main/java/io/apiman/manager/api/schema/SchemaRewriter... | 3 | 1 | 0 | [{"id": "G0", "claim": "The hand-written equals/hashCode on SchemaCacheKey is a bad oversight; a Java record would avoid having to write them by hand.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The commit message labels the change a refactor, but it ... | null |
apiman__apiman__2558 | apiman/apiman | 2,558 | defect | a83fad9e50b0a3c7ec11265fc1830af475980d1c | 0ef1ea648b0b191cc47830ecdc7c2a8ee4ecd460 | fix: ensure use of UTC for the time-restricted-access-policy | During the previous deserialization of `java.util.Date` the config was parsed by jackson to local time of the gateway instead of UTC. Date and joda-time are replaced with java default `OffsetDateTime` now, which also allows us to be more flexible in future. Old configuration are still compatible. Test is added back aga... | diff --git a/gateway/engine/policies/pom.xml b/gateway/engine/policies/pom.xml
index 71a2f5a27e..b49c720067 100644
--- a/gateway/engine/policies/pom.xml
+++ b/gateway/engine/policies/pom.xml
@@ -49,10 +49,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</d... | 2 | 1 | 0 | [{"id": "G0", "claim": "The pull request should complete the contribution checklist, in particular adding a CHANGELOG.adoc entry for the fix.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Please confirm the change will not break existing behaviou... | null |
apiman__apiman__53 | apiman/apiman | 53 | defect | 7ad4c09f946d16534ccd9bd574aacfef02455d83 | a6fb8ff9b0dbebf9c5e4d1768f4735de985c422a | Apiman 238 | Created the IConnectorInterceptor concept which can be set into the context in order to intercept remote connections.
| diff --git a/gateway/engine/beans/src/main/java/io/apiman/gateway/engine/beans/exceptions/InterceptorAlreadyRegisteredException.java b/gateway/engine/beans/src/main/java/io/apiman/gateway/engine/beans/exceptions/InterceptorAlreadyRegisteredException.java
new file mode 100644
index 0000000000..8c728ff3d7
--- /dev/null
+... | 2 | 2 | 2 | [{"id": "G0", "claim": "The test plan invokes 001 but not 002-intercepted-response, so the new interceptor feature is never actually exercised and 002-intercepted-response should be added to the test plan.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
apocas__dockerode__102 | apocas/dockerode | 102 | defect | 2b3853c6a2eb08b70c12a7d51f3b013b772f9715 | c928993a609575afb0f3867228213fec45c00002 | Updated container to run exec commands. | I am writing an app that uses exec to get the current env variables. I have added and successfully used this in my project (which i will be publishing soon to docker)
exec has 2 api commands, therefore i created the 2 functions, and in the example i created you can see the usage.
Please let me know if this is the pro... | diff --git a/examples/exec_running_container.js b/examples/exec_running_container.js
new file mode 100644
index 0000000..3f46e71
--- /dev/null
+++ b/examples/exec_running_container.js
@@ -0,0 +1,42 @@
+var Docker = require('../lib/docker');
+
+var docker = new Docker({socketPath: '/var/run/docker.sock'});
+
+/**
+ * Ge... | 5 | 5 | 2 | [{"id": "G0", "claim": "execstart should take a plain id parameter (Container.prototype.execstart = function(id, opts, callback)) instead of reusing the create output's upper-cased Id field, keeping the calls apart/agnostic from each other.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "int... | null |
apollo-rsps__apollo__286 | apollo-rsps/apollo | 286 | defect | dfa8ebed07b7cb13151e4de78f48cce49b67827c | 1890a9f586eaae11e2a279aa6124d76da06bccd2 | Template method on ChatMessage | Hello,
I made a "template method" on ChatMessage. This modification remove the code duplication between the two classes (PrivateChatMessage and PublicChatMessage).
Thanks.
| diff --git a/data/messages.xml b/data/messages.xml
index 1f5113d4f..d9e09bdb7 100644
--- a/data/messages.xml
+++ b/data/messages.xml
@@ -7,7 +7,7 @@
</chain>
</message>
<message>
- <type>org.apollo.game.message.impl.ChatMessage</type>
+ <type>org.apollo.game.message.impl.PublicChatMessa... | 6 | 6 | 2 | [{"id": "G0", "claim": "Rename the ChatMessageHandler class to PublicChatMessageHandler, since it only handles public chat messages.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The ChatMessage constructor should store compressedMessage.clon... | null |
apolloconfig__agollo__216 | apolloconfig/agollo | 216 | defect | 0daffd08c0b70414acca9822010dec2a349c3130 | 83e8c344ad9c09ff50313340661b8a94914d2f27 | [Fix] 修复当调用 repository.go 中 GetXXXValue,类型不一致时的报错 | * Fixed #215 修复当调用 repository.go 中 GetXXXValue,类型不一致时的报错
* 聚合 `client.go` 的 `GetXXXValue` 方法到 `repository.go` | diff --git a/storage/repository.go b/storage/repository.go
index 3d3e6583..cde96d32 100644
--- a/storage/repository.go
+++ b/storage/repository.go
@@ -21,7 +21,6 @@ import (
"container/list"
"fmt"
"reflect"
- "strconv"
"sync"
"sync/atomic"
@@ -182,40 +181,32 @@ func (c *Config) GetSliceValue(key string) []i... | 1 | 1 | 1 | [{"id": "G0", "claim": "When a type conversion fails in the config value getters (e.g. GetIntValue's unchecked value.(int) assertion), the code should log the error and return the default value.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apolloconfig__agollo__224 | apolloconfig/agollo | 224 | defect | f89da36c4c7846f41352a9371a0d1bd4d0dc01fc | c8d34117043bd420b070861c336cd9431b9b2488 | 支持客户端标签功能 | 加入 java SDK 中已有的功能
https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide?id=_1247-apollolabel
<img width="992" alt="image" src="https://user-images.githubusercontent.com/9931786/163719855-31b6063e-ee08-4e4e-a61b-3943646da6b6.png">
| diff --git a/component/remote/async.go b/component/remote/async.go
index edbd239f..586326b4 100644
--- a/component/remote/async.go
+++ b/component/remote/async.go
@@ -59,12 +59,13 @@ func (*asyncApolloConfig) GetNotifyURLSuffix(notifications string, config config
}
func (*asyncApolloConfig) GetSyncURI(config config... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add test cases to make sure the new client-label logic works.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apolloconfig__agollo__230 | apolloconfig/agollo | 230 | defect | f89da36c4c7846f41352a9371a0d1bd4d0dc01fc | d31afb1a43b0de2ce5199fb8652a775d40168111 | add GetValueNotWait func | handle this issue:https://github.com/apolloconfig/agollo/issues/220 | diff --git a/go.mod b/go.mod
index 1f5c1f51..7252cb7d 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,7 @@
module github.com/apolloconfig/agollo/v4
require (
+ github.com/pkg/errors v0.9.1
github.com/spf13/viper v1.7.1
github.com/tevid/gohamcrest v1.1.1
)
diff --git a/go.sum b/go.sum
index 3dfc8189..fc6808bf 10064... | 3 | 3 | 0 | [{"id": "G0", "claim": "Do not introduce the github.com/pkg/errors package; keep the original log-based way of reporting errors.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rename GetValueNotWait to something like GetValueImmediately and document in t... | null |
apolloconfig__agollo__301 | apolloconfig/agollo | 301 | defect | 914cd4f9f7eb67be345e3055bde3867bcbe55dd2 | 00c5a41257a56407315814063e87347607571dfb | fix: 如果获取不到config,尝试远端同步获取一次,获取到的内容需要更新缓存 | 在获取不到 config 配置的时候,没有将远端获取的内容更新到本地缓存,让查询变得无意义

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Improved error handling in configuration initia... | diff --git a/client.go b/client.go
index 5d50e9a8..8d61ef01 100644
--- a/client.go
+++ b/client.go
@@ -60,7 +60,7 @@ func init() {
var syncApolloConfig = remote.CreateSyncApolloConfig()
-//Client apollo 客户端接口
+// Client apollo 客户端接口
type Client interface {
GetConfig(namespace string) *storage.Config
GetConfig... | 1 | 1 | 1 | [{"id": "G0", "claim": "This looks like a bug that the local cache is not updated; please write a unit test covering the logic.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apolloconfig__agollo__302 | apolloconfig/agollo | 302 | defect | 9a87bea52ee81c866af3eaa0e35e41bee7330744 | aae41953b3b4f9f1d848cd5180e6548ec6268c8f | fix: 触发懒加载时,需要同步更新notify内容,更新component监听变更的ns | 触发懒加载时,需要同步更新notify内容,更新component监听变更的ns;因为sync也会触发component返回,所以component不需要重新 start,期间两秒的时间足够configComponent变更appconfig
component 依赖 appconfig 的内容更新

 to improve readability, maintainability and unit-testability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Inc... | null |
apolloconfig__agollo__344 | apolloconfig/agollo | 344 | defect | 7b9b2c34de437144da34d9d0d7675b0cbde5d62f | d84aab209f1de907e61bb3b955c1d0fe3e388dac | Fix infinite loop when consecutive releases return 304 Not Modified responses | - [x] Modified `SyncWithNamespace` signature to return `(*config.ApolloConfig, error)`
- [x] Updated async sync logic to handle 304 responses correctly
- [x] Updated all call sites (sync.go, client.go, tests)
- [x] Fixed return value in abs.go when apolloConfig is nil
- [x] Simplified logic to check `err == nil` instea... | diff --git a/client.go b/client.go
index ecd67084..937022f0 100644
--- a/client.go
+++ b/client.go
@@ -160,7 +160,7 @@ func (c *internalClient) GetConfigAndInit(namespace string) *storage.Config {
if cfg == nil {
//sync config
- apolloConfig := syncApolloConfig.SyncWithNamespace(namespace, c.getAppConfig)
+ ap... | 7 | 7 | 2 | [{"id": "G0", "claim": "The implementation of `syncWithNamespaceAndDetectNotModified` is entirely separate from `SyncWithNamespace` even though its comment claims it simply wraps it, and the reviewer asks that it be revised to actually wrap it.", "category": "design", "verdict": "supported", "priority": "P1", "scope": ... | null |
apolloconfig__agollo__350 | apolloconfig/agollo | 350 | defect | 105a1d308a2e2971c60198a45fb36fb463549b38 | bee9f114ed26d561d800c352fea0f68e7d4dbdb6 | fix: serverIPListComponent not close when invoke Client close | ## problem1 desc
serverIPListComponent not close when invoke Client close
```golang
client, err := agollo.StartWithConfig(func() (*config.AppConfig, error) {
return appConfig, nil
})
defer client.Close()
```
## problem2 desc
ConfigComponent.stopCh should init when ConfigComponent struct create, not ConfigCo... | diff --git a/client.go b/client.go
index 5f2d6e5a..206d8d70 100644
--- a/client.go
+++ b/client.go
@@ -87,7 +87,7 @@ type internalClient struct {
initAppConfigFunc func() (*config.AppConfig, error)
appConfig *config.AppConfig
cache *storage.Cache
- configComponent *notify.ConfigComponent
+ c... | 12 | 10 | 5 | [{"id": "G0", "claim": "ConfigComponent needs a Stop() implementation for the interface, and both components' Stop() should be protected with sync.Once so that repeated Stop()/Close() calls cannot panic on double-closing the channel.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intro... | null |
apolloconfig__agollo__351 | apolloconfig/agollo | 351 | defect | a289c41933a0c839c8bc861088ed870a04679891 | f25a59b8a4aa2fa583c55c66d9ea8c4825663c56 | fix: support []interface{} in GetStringSliceValue and GetIntSliceValue for YAML arrays | ## Problem
Fixes #348
When parsing YAML namespace configurations, array fields are stored as `[]interface{}` type (this is how Viper parses YAML arrays). However, `GetStringSliceValue` and `GetIntSliceValue` methods only handled `[]string` and `[]int` types directly, causing YAML arrays to be returned as stringified ... | diff --git a/storage/repository.go b/storage/repository.go
index 552cf749..fccddd83 100644
--- a/storage/repository.go
+++ b/storage/repository.go
@@ -167,12 +167,26 @@ func (c *Config) GetStringSliceValueImmediately(key string, defaultValue []strin
return defaultValue
}
- v, ok := value.([]string)
- if !ok {
- ... | 2 | 1 | 1 | [{"id": "G0", "claim": "In the []interface{} -> []int conversion, float64 elements are cast with int(v) without checking for a fractional part or overflow, so values like 1.9 are silently truncated to 1 instead of rejecting the value and returning defaultValue.", "category": "correctness", "verdict": "supported", "prio... | null |
apolloconfig__apollo__1871 | apolloconfig/apollo | 1,871 | defect | a83c77875a4d61b19df31eaa8a87805373a459a3 | ce008c8a6486f5d72a4d2d46bca8958e50ba0ead | feature: support listeners on events based on key patterns. #1461 | Fixes #1461 . This patch enables client listeners to interact on events that the key matches a set of patterns. If this patch is acceptable, I'll add some integration tests later and slightly refactor the listener code. | diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/Config.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/Config.java
index 5414b49af3b..7b4c5efc7b0 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/Config.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo... | 7 | 7 | 1 | [{"id": "G0", "claim": "The @since tag on the new addChangeListener overload says 1.0.0 but should say the version that actually ships it (1.3.0).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @param interestedKeyPatterns javadoc on Config.ad... | null |
apolloconfig__apollo__1891 | apolloconfig/apollo | 1,891 | defect | 0776918ccf6a6f24dafa9ed21513d848ae19a40c | 30da985a6463c5fe37d1d9b2fce6abd84c831752 | fixes #1880 pagination not work | Fixes #1880 | diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/InstanceConfigRepository.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/InstanceConfigRepository.java
index e4c38c0c426..d6ff3fbdde5 100644
--- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/... | 1 | 1 | 0 | [{"id": "G0", "claim": "The test data the new test writes should be rolled back after the test, by annotating the test with @Rollback.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
apolloconfig__apollo__3816 | apolloconfig/apollo | 3,816 | defect | ab6a17253e6daa06dc87e811bbeed994af11c87a | 2e89f180e202d8ea3ba551472fce374c1cb7229b | Reduce bootstrap time in the situation with large properties | ## What's the purpose of this PR
Reduce bootstrap time in the situation with large properties.
Use test method described in [#3800](https://github.com/ctripcorp/apollo/issues/3800#issuecomment-876288944), compare results:
| Baseline | New
-- | -- | --
| 11717ms | 599ms
| 12755ms | 647ms
| 12849ms |... | diff --git a/CHANGES.md b/CHANGES.md
index 2bf6a929d1b..f858f53548b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -54,6 +54,7 @@ Apollo 1.9.0
* [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797)
* [feature: modify item comment valid size](https://github.com/ctripcorp/ap... | 10 | 6 | 3 | [{"id": "G0", "claim": "The Config.getPropertyNames() API cannot simply be changed from Set<String> to String[] because the API is widely used.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Replacing CompositePropertySource with the custom CompositeConf... | null |
apolloconfig__apollo__3819 | apolloconfig/apollo | 3,819 | defect | 72a04989d049e182dd409e2a76e5c0e4448a8a2d | 48d861980523cf79836f71cbefce96e690548c46 | fix the issue that release messages might be missed in certain scenarios | ## What's the purpose of this PR
fix the issue that release messages might be missed in certain scenarios
## Which issue(s) this PR fixes:
Fixes #3806
## Brief changelog
1. record the missing release messages when scanning
2. try to reload and notify the missing release messages for certain amount of time... | diff --git a/CHANGES.md b/CHANGES.md
index 5165929ba85..4a998a2876f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -56,6 +56,7 @@ Apollo 1.9.0
* [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812)
* [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808)... | 3 | 2 | 0 | [{"id": "G0", "claim": "The missingReleaseMessages field should be declared final and initialized at its declaration as `private final Map<Long, Integer> missingReleaseMessages = Maps.newHashMap();`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":... | null |
apolloconfig__apollo__4119 | apolloconfig/apollo | 4,119 | defect | 75f9950d5e1675dbb0617555c4502685ef4d4618 | bb2dc70cbe067ea372668d3642a044150a2fdf21 | add zookeeper service discovery support(#3557) | ## What's the purpose of this PR
新增zookeeper服务发现支持
使用方式:
1. 修改build.sh/build.bat,将`config-service`和`admin-service`的maven编译命令更改为
```shell
mvn clean package -Pgithub,zookeeper-discovery -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,zookeeper-discovery -Dspring_datasource_url=... | diff --git a/apollo-adminservice/pom.xml b/apollo-adminservice/pom.xml
index 22f2dd4a074..d1dbd636236 100644
--- a/apollo-adminservice/pom.xml
+++ b/apollo-adminservice/pom.xml
@@ -175,6 +175,50 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>zookeeper-discovery</id>
+ <dependencies>
+ ... | 9 | 8 | 4 | [{"id": "G0", "claim": "The dependencyManagement section pinning curator and zookeeper versions in the root pom is unnecessary because those dependencies are already managed by spring-cloud-zookeeper-dependencies.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ... | null |
apolloconfig__apollo__4199 | apolloconfig/apollo | 4,199 | defect | fec79aad4ddf4f01417895180414f9320cf3aebd | be351f7f4f33b8271ee25d82fd2e54edda09a017 | Allow disable apollo client cache | ## Which issue(s) this PR fixes:
Fixes #4181
## Brief changelog
- add config `apollo.property.file.cache.enable`
- if `apollo.property.file.cache.enable` is false, use `RemoteConfigRepository`
- add corresponding unit tests
Follow this checklist to help us incorporate your contribution quickly and easily:
... | diff --git a/CHANGES.md b/CHANGES.md
index d8ef11f6e8e..11357c3c70a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -33,6 +33,7 @@ Apollo 2.0.0
* [fix the json number display issue when it's longer than 16](https://github.com/apolloconfig/apollo/pull/4183)
* [Bump client springboot version](https://github.com/apolloconfi... | 7 | 7 | 1 | [{"id": "G0", "claim": "The removal of the explicit `= false` initializer on `propertyNamesCacheEnabled` (while `propertiesOrdered` keeps one) brings confusion, so the field should keep its explicit default value as before.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"... | null |
apolloconfig__apollo__4414 | apolloconfig/apollo | 4,414 | defect | 2cc9fc84bdac3097adc4e1e55a90cc82765718fd | aaf97c45d67e6754ee98d621537d6fc813c2e541 | add cat-client as optional dependency | 通过在apollo-core 模块中,通过provided的方式引入cat-client,这样子可以在core模块中去掉cat相关的反射调用。同时还可以解决由于反射导致的cat 客户端上报心跳多次的问题。 | diff --git a/apollo-core/pom.xml b/apollo-core/pom.xml
index 3292b1cf8a5..b82ac72e78d 100644
--- a/apollo-core/pom.xml
+++ b/apollo-core/pom.xml
@@ -31,6 +31,11 @@
<github.path>${project.artifactId}</github.path>
</properties>
<dependencies>
+ <dependency>
+ <groupId>com.dianping.cat</groupId>
+ <artifactId... | 1 | 1 | 1 | [{"id": "G0", "claim": "The release note for this pull request should be recorded in the repository's CHANGES.md rather than in a new changes/changes-2.1.0.md file.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
apolloconfig__apollo__4464 | apolloconfig/apollo | 4,464 | defect | afad056ec7f81dc00eb33fa8094c45ca1915fe8a | a95d300f6e8d4c0920f7a2a36687f47f43dfb4b9 | feature: A user-friendly user management page for apollo portal | ## What's the purpose of this PR
A user-friendly user management page for apollo portal
## Which issue(s) this PR fixes:
Fixes #4294
## Brief changelog
* Modify the backend, add and modify users, and search the contents of the user interface
* Modified the front-end management user interface
Follow thi... | diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/bo/UserInfo.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/bo/UserInfo.java
index 6c338400b92..a483940264a 100644
--- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/bo/UserInfo.java
+++... | 11 | 10 | 6 | [{"id": "G0", "claim": "The i18n labels added to zh-CN.json and en.json should be sorted by alphabet order.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Changing findUsers' empty-keyword branch to userRepository.findAll() makes disabled users ap... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.