Skip to content

Python worker fails to start on Windows: startup-config JSON argv loses quotes #5916

Description

@yangzhang75

What happened?

PR #5597 changed PythonWorkflowWorker to pass the Python worker's startup config as a single JSON-string command-line argument (e.g. {"workerId":"w","outputPort":"5000",...}), parsed by texera_run_python_worker.py via json.loads.

On Windows, the JVM (ProcessBuilder) assembles argv into a single command-line string, and the inner double quotes are stripped before Python receives the argument. Python then gets {workerId:w,...} instead of valid JSON and crashes with:
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes
Linux/macOS are unaffected because the JVM passes argv directly without a shell, so the quotes survive.

Expected: Python worker starts on all platforms.

How to reproduce?

  1. On Windows, run a workflow containing any Python UDF operator.
  2. The Python worker process fails to launch; logs show the JSONDecodeError above.

Version/Branch: 1.3.0-incubating-SNAPSHOT (main)

Commit Hash: 84fe817 (merge of #5597)

Version/Branch

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

No response

Relevant log output

JSONDecodeError: Expecting property name enclosed in double quotes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions