Skip to content

feat(cli): migrate the uipath server runtime channel from HTTP to uipath-ipc [ROBO-5779]#1786

Draft
eduard-dumitru wants to merge 1 commit into
mainfrom
feature/migrate-to-ipc
Draft

feat(cli): migrate the uipath server runtime channel from HTTP to uipath-ipc [ROBO-5779]#1786
eduard-dumitru wants to merge 1 commit into
mainfrom
feature/migrate-to-ipc

Conversation

@eduard-dumitru

Copy link
Copy Markdown

Draft — Phase 1 (RPC) of migrating the LowCode Python-runtime channel from HTTP to uipath-ipc. Coordinated with a matching hdens/.NET executor change (not yet open). Not for merge yet — see Open items.

What

Replaces the HTTP/socket channel (Unix-socket + TCP + ready-ACK) for the pre-warmed Python runtime with a uipath-ipc named-pipe server. uipath server --pipe-name <name> now hosts IPythonRuntimeServer (Ping / StartJob / CancelJob) over a named pipe — a $TMPDIR/CoreFxPipe_<name> UDS on Linux, a Win32 pipe on Windows — which the .NET job executor connects to as the client. This unifies today's UDS-on-Linux / TCP-on-Windows split into one primitive.

Changes

  • cli_server.pyIPythonRuntimeServer contract + PythonRuntimeService, served by IpcServer over NamedPipeServerTransport, keeping the existing per-job os.environ/cwd isolation. DTOs cross as plain PascalCase dicts (matching the .NET DTOs). StartJob is @ipc_cancellable; CancelJob and a host-cancelled StartJob set a per-job threading.Event exposed via get_current_cancellation() (cooperative, best-effort). The server command takes a required --pipe-name and runs on a Windows Proactor loop (named pipes require it). Removes the entire HTTP pathstart_unix_server/start_tcp_server, create_app, the request handlers, host-validation, send_ack, the SOCKET_ENV_VAR/DEFAULT_SOCKET_PATH/DEFAULT_PORT/generate_socket_path symbols, and the --client-socket/--server-socket/--port/--tcp options.
  • pyproject.toml — adds the uipath-ipc dependency, pinned via [tool.uv.sources] + [[tool.uv.index]] to the (anonymously accessible) UiPath-Internal Azure Artifacts feed so uv/CI can resolve it.
  • tests — replaces the HTTP test_server.py with test_server_ipc.py, driving the IPC server over a pipe (Ping/StartJob/CancelJob, env isolation, cooperative cancel).

Verified locally

uv sync installs everything (incl. uipath-ipc from the anonymous feed), and uipath server --pipe-name demo runs while a client round-trips Ping ({Status: ready, RuntimeVersion: 2.11.18}) and CancelJob over a real named pipe.

Open items / follow-ups (why this is a draft)

  • Distribution — the shipped wheel declares uipath-ipc>=2.5.1, which currently lives only on the UiPath-Internal feed (not PyPI). A public pip install uipath needs it resolvable, so this needs a decision: publish uipath-ipc to PyPI, or make it an optional extra. The [tool.uv.*] config only unblocks uv/CI resolution — it is not baked into the wheel.
  • .NET executor (PR A) — the matching hdens change (spawn uipath server --pipe-name, IpcClient proxy, Ping readiness) is required for full end-to-end.
  • Cooperative cancel — making run/debug/eval + the agent actually poll get_current_cancellation() to stop early is a runtime-side follow-up (a non-cooperating job runs to completion, as before).
  • Logs — still file-tailed (execution.log); moving them onto IPC is Phase 2.

🤖 Generated with Claude Code

@eduard-dumitru eduard-dumitru changed the title feat(cli): migrate the uipath server runtime channel from HTTP to uipath-ipc feat(cli): migrate the uipath server runtime channel from HTTP to uipath-ipc [ROBO-5779] Jul 2, 2026
…ath-ipc

Replaces the HTTP/socket channel (Unix-socket + TCP + ready-ACK) for the
pre-warmed Python runtime with a uipath-ipc named-pipe server. `uipath server
--pipe-name <name>` now hosts IPythonRuntimeServer (Ping / StartJob / CancelJob)
over a named pipe — a $TMPDIR/CoreFxPipe_<name> Unix socket on Linux, a Win32
pipe on Windows — which the .NET job executor connects to as the client. This
unifies today's UDS-on-Linux / TCP-on-Windows split into one primitive.

- cli_server.py: adds the IPythonRuntimeServer contract + PythonRuntimeService
  (served by IpcServer over NamedPipeServerTransport), with per-job
  os.environ/cwd isolation. DTOs cross as plain PascalCase dicts (matching the
  .NET DTOs). StartJob is @ipc_cancellable; CancelJob and a host-cancelled
  StartJob set a per-job threading.Event exposed via get_current_cancellation()
  for the runtime to poll (cooperative, best-effort). The server command now
  takes a required --pipe-name and runs on a Windows Proactor loop (named pipes
  require it). Removes the whole HTTP path (start_unix_server, start_tcp_server,
  create_app, handle_start, handle_health, host-validation, send_ack, the
  SOCKET_ENV_VAR / DEFAULT_SOCKET_PATH / DEFAULT_PORT / generate_socket_path
  symbols, and the --client-socket / --server-socket / --port / --tcp options).
- pyproject.toml: add the uipath-ipc dependency, pinned via [tool.uv.sources] +
  a [[tool.uv.index]] to the anonymously accessible UiPath-Internal Azure
  Artifacts feed so uv/CI can resolve it. This is uv resolution config only, not
  baked into the wheel; a public pip install uipath still needs uipath-ipc
  resolvable (public-PyPI release or an optional extra), a follow-up decision.
- tests: replace the HTTP test_server.py with test_server_ipc.py, driving the
  IPC server over a pipe (Ping / StartJob / CancelJob, env isolation, cancel).

Phase 1 (RPC) of the HTTP -> IPC migration. Logs stay file-tailed; making
run/debug/eval + the agent poll the cancel signal is a runtime-side follow-up.
Coordinated with the .NET executor (which must pass --pipe-name).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eduard-dumitru eduard-dumitru force-pushed the feature/migrate-to-ipc branch from 348498e to bbf3dc8 Compare July 2, 2026 12:52
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jul 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
73.8% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

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

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant