Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

barjin
Copy link
Contributor

@barjin barjin commented Sep 8, 2025

The original check from #302 was not sufficient. When the user passes forceCloud: true to KVS.open(), the SDK instance points to a platform-backed KVS, even if the script is run locally.

This PR proposes checking the runtime type of KeyValueStore.client. If this is a client instance from apify-client, we're communicating with the platform, regardless of the place of execution (Platform / locally).

Closes #459

@barjin barjin requested a review from janbuchar September 8, 2025 13:26
@barjin barjin self-assigned this Sep 8, 2025
@barjin barjin requested a review from B4nan September 8, 2025 13:26
@github-actions github-actions bot added this to the 123rd sprint - Tooling team milestone Sep 8, 2025
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 8, 2025
@barjin
Copy link
Contributor Author

barjin commented Sep 8, 2025

While this works, it requires private property access. I'm open to alternatives, such as:

  • duck-typing the KVS storage here (there are some differences between the accessible properties in memory-backed and platform-backed storage)
  • making KVS.client protected (not private) in Crawlee, so we can access it here with an easy conscience
  • ...?

@janbuchar
Copy link
Contributor

Thanks for the fix @barjin! I believe that anything is fine as long as it works. We're going to overhaul the storage system in crawlee v4 anyways, so no need to overthink it now.

@barjin barjin merged commit 12e5f9f into master Sep 9, 2025
9 checks passed
@barjin barjin deleted the chore/fix-e2e-tests branch September 9, 2025 07:22
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kv-store getPublicUrl, with { forceCloud: true } returns local path instead of public url

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.