Skip to content

Conversation

@Pijukatel
Copy link
Contributor

Description

  • Extract API storage client creation from the Apify storage open method to ApiClientFactory
  • Create specific variants of the factory and use them in open methods of Apify storages.

@github-actions github-actions bot added this to the 127th sprint - Tooling team milestone Nov 5, 2025
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 5, 2025
@Pijukatel Pijukatel added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 5, 2025
@Pijukatel
Copy link
Contributor Author

Refactoring refactoring to the discussion in:
https://apify.slack.com/archives/CD0SF6KD4/p1761306404835039

@Pijukatel Pijukatel requested a review from vdusek November 5, 2025 12:25
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Nov 11, 2025
Without additional inheritance in individual storage clients.
@vdusek vdusek force-pushed the refactor-open-storage-methods branch from 64ccb91 to 7c40de0 Compare November 11, 2025 14:39
Copy link
Contributor Author

@Pijukatel Pijukatel left a comment

Choose a reason for hiding this comment

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

I am fine with this approach as well. Just some small comments


async def create_api_client(
*,
storage_type: Literal['key_value_store', 'request_queue', 'dataset'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there any benefit in keeping this virtual mapping between class and literal?
Why not use the class directly?

Copy link
Contributor

@vdusek vdusek Nov 12, 2025

Choose a reason for hiding this comment

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

import hell (circular imports) - this is a better approach, trust me, I've been there 😄

@vdusek vdusek marked this pull request as ready for review November 12, 2025 10:02
Copy link
Contributor

@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.

LGTM

@Pijukatel Pijukatel merged commit ca37836 into master Nov 14, 2025
21 checks passed
@Pijukatel Pijukatel deleted the refactor-open-storage-methods branch November 14, 2025 10:19
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.

3 participants