Skip to content

Conversation

Mantisus
Copy link
Collaborator

@Mantisus Mantisus commented Oct 6, 2025

Description

  • Added name validation for storages in accordance with Apify platform restrictions

Issues

Testing

  • Added new tests to verify correct validation.

@Mantisus Mantisus requested review from vdusek and Pijukatel and removed request for vdusek October 6, 2025 16:29
@Mantisus Mantisus self-assigned this Oct 6, 2025
@Mantisus Mantisus requested a review from vdusek October 6, 2025 16:29
@vdusek vdusek requested review from janbuchar and removed request for Pijukatel October 7, 2025 07:59
@vdusek
Copy link
Collaborator

vdusek commented Oct 7, 2025

assigning @janbuchar as @Pijukatel is off for this week

Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

Thanks. I'm wondering, shouldn't we add this new enforcement on this level to https://crawlee.dev/python/docs/upgrading/upgrading-to-v1?

Comment on lines +1058 to +1077
@pytest.mark.parametrize(
('name', 'is_valid'),
[
pytest.param('F', True, id='single-char'),
pytest.param('7', True, id='single-digit'),
pytest.param('FtghdfseySds', True, id='mixed-case'),
pytest.param('125673450', True, id='all-digits'),
pytest.param('Ft2134Sfe0O1hf', True, id='mixed-alphanumeric'),
pytest.param('name-with-dashes', True, id='dashes'),
pytest.param('1-value', True, id='number start'),
pytest.param('value-1', True, id='number end'),
pytest.param('test-1-value', True, id='number middle'),
pytest.param('test-------value', True, id='multiple-dashes'),
pytest.param('test-VALUES-test', True, id='multiple-cases'),
pytest.param('name_with_underscores', False, id='underscores'),
pytest.param('name with spaces', False, id='spaces'),
pytest.param('-test', False, id='dashes start'),
pytest.param('test-', False, id='dashes end'),
],
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this also correspond to the naming constraints in SqlStorageClient?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep.

@Mantisus Mantisus requested a review from vdusek October 7, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate storage names before passing them to the storage client
3 participants