Skip to content

Actor.get_input() should decide on the working-directory fallback the JS SDK adds #1140

Description

@vladfrangu

apify/apify-sdk-js#729 makes Actor.getInput() in the JS SDK v4 fall back to a <input_key> or <input_key>.json file in the current working directory when the default key-value store has no input record. Python's Actor.get_input() reads only the store. Either Python matches, or the divergence is accepted and documented.

The JS rule:

  • Runs only when the store has no record under the input key, and never on the platform.
  • Candidates are <input_key> and <input_key>.json in the working directory. Both present raises.
  • .json is parsed as JSON. The bare file is tried as JSON and returned as bytes otherwise, the same as an application/octet-stream record.

This came from crawlee v3, where KeyValueStore.getInput() probed the working directory before the store and also accepted INPUT.txt.

[🤖] Claude Code using Fable 5.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions