-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: Refactor service usage to rely on service_locator
#691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for kicking this off!
We might want to try and resolve #369 here as well. Additional context in Apify Slack - https://apify.slack.com/archives/C02JQSN79V4/p1723708212887119 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
Also apify/apify-sdk-python#324 (comment) is relevant here - if we could remove the need to initialize |
service_container
exclusively [WIP]
c8747d6
to
bf427bd
Compare
service_container
exclusively [WIP]service_container
exclusively
4c8472c
to
99f75de
Compare
service_container
exclusivelyservice_container
exclusively
service_container
exclusivelyservice_container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but maybe @janbuchar should approve as well.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
5e39fcb
to
c87c395
Compare
Description
service_container
module has been completely refactored. It introduces changes to its usage, and resulting in many changes across the code base.service_container
internally. They no longer store service instances themselves.force
flag has been added to theservice_container
's setters, which is especially useful for testing purposes.memory_storage_client
.set_storage_client
, the same approach as for theevent_manager
. This is more flexible (allows more envs than just local & cloud). And in the SDK Actor, we can them based on theis_at_home
.service_container
interface.Open discussion
service_container
? Thoughts are welcome.service_container
?service_locator
?service_locator
Issues
service_container
#699configuration
argument #539Testing
service_container
, have been updated to reflect these changes.MemoryStorageClient
respects theConfiguration
.Manual reproduction
Crawler
andMemoryStorageClient
respects the customConfiguration
.Checklist