Skip to content

refactor(storages)!: rename storage clients to storage backends - #2362

Merged
vdusek merged 9 commits into
v2from
storage-backend
Oct 30, 2026
Merged

vdusek merged 9 commits into
v2from
storage-backend

Conversation

@vdusek

@vdusek vdusek commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Renames the pluggable storage layer from "storage clients" to "storage backends". Crawlee had a top-level storage client, a client per storage type, and the Apify API client on top, which made the role of each one hard to tell apart.

  • crawlee.storage_clients is now crawlee.storage_backends.
  • StorageClient, DatasetClient, KeyValueStoreClient, RequestQueueClient and the Memory, FileSystem, Sql and Redis implementations are now *Backend.
  • storage_client arguments (BasicCrawler, ServiceLocator, Dataset.open, ...) are now storage_backend, and service_locator.get_storage_client / set_storage_client are now get_storage_backend / set_storage_backend.
  • For custom backends: create_*_client and get_storage_client_cache_key on StorageBackend are renamed to match, and the Dataset, KeyValueStore and RequestQueue constructors take backend.
  • The guide moves to /docs/guides/storage-backends, and upgrading_to_v2.md lists all the renames.

It's a hard break with no aliases in v2. The deprecated aliases go into the last v1 minor. The Apify SDK subclasses the base and file-system backends, so it needs a matching rename when it moves to crawlee v2.

The log message about the implicit default backend and the unsupported-arguments warning of dataset backends have new wording.

Closes: #1592

✍️ Drafted by Claude Code

BREAKING CHANGE: `crawlee.storage_clients` is now `crawlee.storage_backends`, the `*Client` storage classes are now `*Backend`, and `storage_client` arguments and service locator methods use `storage_backend`. Log messages that named the storage client now name the storage backend, and the unsupported-arguments warning of dataset backends ends with the backend class name.
@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 29, 2026
@vdusek vdusek self-assigned this Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.89266% with 11 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (v2@75b5129). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rc/crawlee/storage_backends/_sql/_backend_mixin.py 81.81% 4 Missing ⚠️
.../crawlee/storage_backends/_redis/_backend_mixin.py 76.92% 3 Missing ⚠️
.../storage_backends/_redis/_request_queue_backend.py 66.66% 3 Missing ⚠️
src/crawlee/storages/_key_value_store.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             v2    #2362   +/-   ##
=====================================
  Coverage      ?   94.28%           
=====================================
  Files         ?      187           
  Lines         ?    13823           
  Branches      ?        0           
=====================================
  Hits          ?    13033           
  Misses        ?      790           
  Partials      ?        0           
Flag Coverage Δ
unit 94.28% <96.89%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested review from Mantisus and Pijukatel October 29, 2026 08:44
@vdusek
vdusek marked this pull request as ready for review October 29, 2026 08:44

@Mantisus Mantisus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Few nits. Otherwise LGTM

Comment thread docs/upgrading/upgrading_to_v2.md Resolved
Comment thread docs/guides/storage_backends.mdx Resolved

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

# Conflicts:
#	docs/upgrading/upgrading_to_v2.md
#	src/crawlee/storages/_request_queue.py
#	tests/unit/crawlers/_basic/test_basic_crawler.py
@vdusek vdusek linked an issue Oct 30, 2026 that may be closed by this pull request
@vdusek
vdusek merged commit d06b603 into v2 Oct 30, 2026
35 checks passed
@vdusek
vdusek deleted the storage-backend branch October 30, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider renaming "storage client" to "storage backend"

2 participants