feat(cli): update the IPC IPythonJobApi contract - #1906
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes an IPC wire contract and cross-process messaging semantics, which warrants final human verification despite strong test updates.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Updates the uipath CLI’s IPC job-callback contract to a Python-specific IPythonJobApi, ensuring every log/result DTO includes (JobKey, ResumeVersion) metadata and adding UTC timestamps to streamed log entries so the handler can attribute emission time correctly.
Changes:
- Introduces
IPythonJobApiwithSendLog(PythonJobLogDto)/SetResult(PythonJobResultDto)and migrates DTOs to PascalCase wire keys plus run identification fields. - Updates the pooled runtime server path (
uipath server) to request/install sinks using the new contract and to includeResumeVersion. - Updates CLI tests to pin the new on-wire key sets and validate real named-pipe round-trips for both DTOs; bumps version to
2.14.24.
| File | Description |
|---|---|
| packages/uipath/src/uipath/_cli/_job_api.py | Defines IPythonJobApi, new DTOs, and updates sink/log/result forwarding to include run identity and log timestamps. |
| packages/uipath/src/uipath/_cli/cli_server_ipc.py | Switches pooled server callback contract to IPythonJobApi and passes through ResumeVersion to sink installation. |
| packages/uipath/tests/cli/test_job_api.py | Updates assertions and wire-key pinning for the new PascalCase DTO contract and new method signatures. |
| packages/uipath/tests/cli/test_server_ipc.py | Updates named-pipe integration test to use IPythonJobApi and validates streamed DTO contents via real IPC. |
| packages/uipath/pyproject.toml | Bumps package version to 2.14.24. |
| packages/uipath/uv.lock | Updates locked version to 2.14.24. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
360
to
364
| def is_wire_job_id(job_id: str | None) -> TypeGuard[str]: | ||
| """The peer types the job id as a Guid, and routes nothing for one it can't match.""" | ||
| """The peer types the job key as a Guid, and routes nothing for one it can't match.""" | ||
| try: | ||
| parsed = uuid.UUID(str(job_id)) | ||
| except ValueError: |
Comment on lines
+136
to
+138
| installed.append( | ||
| install_runtime_sinks(job_key, callback, loop, resume_version) | ||
| ) |
IPythonJobApi contract
eduard-dumitru
force-pushed
the
feat/python-job-api-contract
branch
from
September 21, 2026 17:08
5d69e08 to
7087f5b
Compare
robert-ursu
approved these changes
Sep 22, 2026
… on every message The handler now hosts a Python-specific job api instead of sharing the JS one, and it routes pooled callbacks by job key and resume version. Every log and result DTO carries JobKey and ResumeVersion inline; both are required inputs, so a lane states None on purpose rather than by omission. Wire keys are PascalCase throughout, matching the peer's property names. Gated off in production until the handler raises its version floor to this release.
eduard-dumitru
force-pushed
the
feat/python-job-api-contract
branch
from
September 22, 2026 07:11
7da1aa6 to
8838c75
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What
The handler is moving the Python job api to its own CoreIPC contract,
IPythonJobApi(UiPath/hdens#8031), instead of sharing the JS one. This PR makesuipath runanduipath serverspeak it.IPythonJobApi; methodsSendLog(PythonJobLogDto)andSetResult(PythonJobResultDto), one DTO parameter each.JobKey+ResumeVersion. The pooled server takes them from theRunJobrequest;uipath runtakes the key fromUIPATH_JOB_KEY(no resume version on that lane today, sent as null).Why the rename
The old shared contract had a parameter named
jobIdthat Python filled with the job key. Giving Python its own contract makes the identifier honest and lets the handler route pooled callbacks by(JobKey, ResumeVersion), dropping a previous resume's stragglers instead of delivering them into the current run.Compatibility
Gated off in production: the handler only arms the IPC job api behind FPS flags that are off, and it will raise its uipath version floor to this release before turning them on. Older handlers never call this contract.
Testing
tests/cli/test_job_api.pyandtests/cli/test_server_ipc.pyupdated (49 tests, including a real in-proc pipe round trip of both DTOs). Fullpackages/uipathsuite green; mypy clean; ruff clean.Version bumped to 2.14.24.