Skip to content

refactor!: Make Actor initialization stricter and more predictable#576

Merged
Pijukatel merged 55 commits intomasterfrom
test-new-storage-services-creation-2
Sep 18, 2025
Merged

refactor!: Make Actor initialization stricter and more predictable#576
Pijukatel merged 55 commits intomasterfrom
test-new-storage-services-creation-2

Conversation

@Pijukatel
Copy link
Copy Markdown
Contributor

@Pijukatel Pijukatel commented Sep 2, 2025

Description

  • All relevant parts of Actor are initialized in async init, not in __init__.
  • Actor is considered finalized after Actor.init was run. This also means that the same configuration used by the Actor is set in the global service_locator.
  • There are three valid scenarios for setting up the configuration.
    • Setting global configuration in service_locator before the Actor.init
    • Having no configuration set in service_locator and set it through Actor.(configuration=...) and running Actor.init()
    • Having no configuration set in service_locator and no configuration passed to Actor will create and set implicit default configuration
  • Properly set ApifyFileSystemStorageClient as local client to support pre-existing input file.
  • Depends on refactor!: Refactor storage creation and caching, configuration and services crawlee-python#1386
  • Enable caching of ApifyStorageClient based on token and api_public_url and update NDU storage handling.

Issues

Rated to: #513, #590

Testing

Loading
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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants