Skip to content

feat(cli): add opt-in uipath-ipc transport to uipath server [ROBO-5779]#1786

Draft
eduard-dumitru wants to merge 2 commits into
mainfrom
feature/migrate-to-ipc
Draft

feat(cli): add opt-in uipath-ipc transport to uipath server [ROBO-5779]#1786
eduard-dumitru wants to merge 2 commits into
mainfrom
feature/migrate-to-ipc

Conversation

@eduard-dumitru

@eduard-dumitru eduard-dumitru commented Jul 2, 2026

Copy link
Copy Markdown

Draft — Phase 1 (RPC) of adding a uipath-ipc runtime channel to uipath server, alongside a matching hdens/.NET executor change (not yet open). Not for merge yet — see Open items.

What

Adds a uipath-ipc named-pipe transport to uipath server as an opt-in, second transport — HTTP-over-socket stays the default. Transport is chosen by the UIPATH_SERVER_IPC env var (its presence selects IPC); the --server-socket arg is shared — a pipe name under IPC, a UDS path under HTTP. So the .NET executor never changes how it spawns the server, and an older runtime that predates IPC simply ignores the env var and keeps doing HTTP.

This is intentionally additive and reversible: the uipath server command is internal and consumed only by the .NET executor (SDK users, coded workflows, and agent frameworks never call it), so IPC can be validated on Linux + Windows with real jobs while HTTP remains a kill-switch. Retiring HTTP is a later phase.

Changes

  • cli_server.py — one shared, transport-agnostic job core (_run_command_isolated: per-job os.environ/cwd save-set-restore, serialized by _state.lock), fronted by two edges:
    • HTTP (default, unchanged): create_app / GET /health / POST /jobs/{job_key}/start, Unix socket or TCP (--client-socket/--server-socket/--port/--tcp), ready-ACK, host-header validation.
    • IPC (opt-in): IPythonRuntimeServer (Ping / StartJob) + PythonRuntimeService over NamedPipeServerTransport, on a Windows Proactor loop. DTOs cross as PascalCase dicts (matching the .NET DTOs).
    • Selection: _should_use_ipc() = UIPATH_SERVER_IPC present AND _ipc_capability_available() — an isolated, non-failing capability seam (today: is uipath_ipc importable) so an env var set against a runtime without IPC support falls back to HTTP instead of failing. --server-socket is the pipe name in IPC mode (required there).
  • pyproject.toml — adds uipath-ipc as a 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 — keeps the HTTP suite (test_server.py) and adds test_server_ipc.py (IPC: Ping / StartJob, env isolation) + test_server_transport.py (env-var selection, capability fallback, endpoint guard).

Verified locally

uv sync installs everything (incl. uipath-ipc from the anonymous feed). All three server test suites pass — HTTP, IPC, and transport-selection. ruff check, ruff format --check, and mypy are clean on the changed files. (The two test_start_job_success cases need the runtime factory the CLI registers via _ensure_runtime_initialized, which the in-process test harness bypasses — a pre-existing test-isolation quirk, green in the full suite / when the factory is registered.)

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

  • Distributionuipath-ipc is a hard dependency but currently lives only on the UiPath-Internal feed (not PyPI). A public pip install uipath needs it resolvable, so publishing uipath-ipc to PyPI is a GA prerequisite. The [tool.uv.*] config only unblocks uv/CI resolution — it is not baked into the wheel.
  • .NET executor (PR A) — the matching hdens change sets UIPATH_SERVER_IPC to opt into IPC, connects an IpcClient proxy, uses Ping for readiness, and auto-falls back to HTTP against an older Python (behind a capability seam mirroring _ipc_capability_available). Required for full end-to-end.
  • Cancellation — out of scope for Phase 1 (reverted); StopJobAsync stays a no-op. A future phase can add it.
  • 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
@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
@eduard-dumitru eduard-dumitru force-pushed the feature/migrate-to-ipc branch from bbf3dc8 to 27e57dc Compare July 6, 2026 07:53
@eduard-dumitru eduard-dumitru changed the title feat(cli): migrate the uipath server runtime channel from HTTP to uipath-ipc [ROBO-5779] feat(cli): add opt-in uipath-ipc transport to uipath server [ROBO-5779] Jul 6, 2026
@eduard-dumitru eduard-dumitru force-pushed the feature/migrate-to-ipc branch 2 times, most recently from f61db5d to c99debc Compare July 6, 2026 09:31
`uipath server` now supports two transports behind one shared job core; HTTP
stays the DEFAULT and IPC is opt-in via an env var, so the switch is reversible
and backward compatible.

- Transport = the UIPATH_SERVER_IPC env var: its presence selects uipath-ipc,
  gated by _ipc_capability_available() (an isolated, non-failing seam — today
  "is uipath_ipc importable") so an env var set against a runtime without IPC
  support falls back to HTTP instead of failing. Unset ⇒ HTTP.
- The endpoint arg is shared: --server-socket is the pipe name under IPC and the
  UDS path under HTTP. The executor never changes how it spawns, and an older
  runtime that predates IPC just ignores the env var and treats it as a UDS path.
- HTTP edge (default, unchanged): create_app / /health / /jobs/{job_key}/start,
  Unix socket or TCP, ready-ACK, host-header validation.
- IPC edge (opt-in): IPythonRuntimeServer (Ping / StartJob) over
  NamedPipeServerTransport, Windows Proactor loop.

Both edges run jobs through _run_command_isolated (per-job env/cwd isolation,
serialized by _state.lock). Cancellation is out of scope for Phase 1
(StopJobAsync stays a no-op); a future phase can add it.

`uipath-ipc` stays a hard dependency (internal Azure Artifacts feed for now).
Publishing it to public PyPI is a prerequisite for a public `pip install uipath`.

Tests: test_server.py (HTTP), test_server_ipc.py (IPC), test_server_transport.py
(env-var selection, capability fallback, endpoint guard).

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 c99debc to 44f22cb Compare July 6, 2026 10:04
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
73.7% 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.

2 participants