Skip to content

fix: validate storage name and alias values#1950

Open
vdusek wants to merge 2 commits into
masterfrom
fix/validate-storage-name-alias
Open

fix: validate storage name and alias values#1950
vdusek wants to merge 2 commits into
masterfrom
fix/validate-storage-name-alias

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented Jun 5, 2026

Summary

Storage aliases were not validated the same way storage names are. This change:

  • Adds validation for storage aliases (previously unvalidated), allowing the same simple identifier characters used for names plus the reserved __default__ alias.
  • Ensures a storage name or alias always maps to a single subdirectory inside the configured storage directory, both via the high-level API and when the file-system storage clients are used directly.

Includes unit tests for the new validation and for the file-system clients.

Add validation for storage aliases (previously unvalidated) and ensure storage names and aliases map to
a single subdirectory inside the storage directory, including when the file-system storage clients are
used directly. Add tests.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Jun 5, 2026
@vdusek vdusek self-assigned this Jun 5, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 5, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.97%. Comparing base (76927d7) to head (ec9162a).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/crawlee/storages/_utils.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1950      +/-   ##
==========================================
- Coverage   92.98%   92.97%   -0.01%     
==========================================
  Files         167      167              
  Lines       11712    11722      +10     
==========================================
+ Hits        10890    10899       +9     
- Misses        822      823       +1     
Flag Coverage Δ
unit 92.97% <95.00%> (-0.01%) ⬇️

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 marked this pull request as ready for review June 5, 2026 07:44
@vdusek vdusek requested a review from janbuchar June 5, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants