Skip to content

feat: forward the configured entry point from a process tool [PC-4935] - #1042

Open
UiPathPetruPopa wants to merge 4 commits into
mainfrom
pc-4935/entry-point-path
Open

feat: forward the configured entry point from a process tool [PC-4935]#1042
UiPathPetruPopa wants to merge 4 commits into
mainfrom
pc-4935/entry-point-path

Conversation

@UiPathPetruPopa

Copy link
Copy Markdown
Contributor

What changed?

Reads entry_point_path off the tool's stored properties and passes it to invoke_async, so a process tool runs the entry point the user selected rather than whichever one the release happens to default to. Also surfaced in tool metadata, following the shape #1038 established for folder_key.

Nothing sets the property yet — the picker that does is gated behind its own flag in the Agents repo and lands last.

Why the read is a getattr

The attribute is genuinely optional at runtime. BaseResourceProperties sets extra="allow", so against a uipath release predating the declared field the value exists only when the stored JSON carried it — and plain attribute access raises AttributeError for every tool with no selection, which today is all of them. None is also the meaningful value: it is how Orchestrator is told to use the release's configured entry point.

⚠️ Blocked on a publish — do not merge yet

The dependency floors are deliberately NOT raised in this PR. uipath 2.14.6 and uipath-platform 0.2.20 carry the new parameter but are not on PyPI yet (UiPath/uipath-python#1866), so raising the floors now makes the project unresolvable — I tried, and uv refuses.

They must be raised before this merges. Without the raise, an older uipath absorbs entry_point_path into invoke_async's **kwargs and drops it before the payload is built — so the selection is silently ignored and the job still reports success. That is the exact silent-success failure this whole change exists to eliminate.

Required edit once #1866 publishes:

"uipath>=2.14.6, <2.15.0",
"uipath-platform>=0.2.20, <0.3.0",

…plus uv lock to match.

How has this been tested?

  • 31 tests in tests/agent/tools/test_process_tool.py pass. Two added: the stored path reaches invoke_async, and it appears in tool metadata.
  • Mutation-checked: deleting the entry_point_path= forward fails four tests, including the three pre-existing exact-args assertions. The forwarding is guarded, not merely executed.
  • Those three pre-existing assertions were updated to expect entry_point_path=None — direct evidence the default path is unchanged for process, flow and function tools alike.
  • ruff check and ruff format --check clean.

Are there any breaking changes?

  • Under Feature Flag
  • None
  • DB migrations
  • API removals
  • Authentication/Authorization
  • Deployment pipeline
  • Infrastructure

Order

Last of the three runtime PRs. uipath + uipath-platform (#1866) publish → floors raised here → this merges → only then is the picker UI safe to ship, since that is what makes the field user-reachable.

🤖 Generated with Claude Code

UiPathPetruPopa and others added 3 commits August 19, 2026 14:15
Reads entry_point_path off the tool's stored properties and passes it to
invoke_async, so a process tool runs the entry point the user selected rather than
whichever one the release happens to default to. Also surfaced in tool metadata,
following the shape #1038 established for folder_key.

The read is a getattr rather than plain attribute access, because the attribute is
genuinely optional at runtime. BaseResourceProperties sets extra="allow", so against
a uipath release predating the declared field the value exists only when the stored
JSON carried it, and plain access raises AttributeError for every tool that has no
selection -- which today is all of them.

Dependency floors deliberately NOT raised in this commit. uipath 2.14.6 and
uipath-platform 0.2.20 carry the parameter but are not on PyPI yet, so raising the
floors now makes the project unresolvable. They must be raised before this merges:
without the raise, an older uipath absorbs entry_point_path into invoke_async's
**kwargs and drops it before the payload, so the selection is silently ignored and
the job still reports success.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI runs mypy as part of lint; I had only run ruff locally. tool.metadata is typed
dict[str, Any] | None, so indexing it needs the same `is not None` assertion every
other metadata test in this file already makes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment-only. Keeps why getattr is used rather than attribute access; drops the restatement
of what None means, which the surrounding code already shows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment on lines +63 to +65
# getattr, not attribute access: BaseResourceProperties sets extra="allow", so against a uipath
# release predating the declared field the value is present only if the stored JSON carried it.
entry_point_path = getattr(resource.properties, "entry_point_path", None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: You don't need conditional access here, just bump uipath-python once it's merged and access the field normally. It is already typed as Optional.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but it has to wait: this repo is on uipath 2.14.1, which has no entry_point_path on the process properties, so dropping the getattr raises AttributeError today. Will bump the floor and access it normally once #1866 (uipath-python) is merged and published — leaving this open until then.

@UiPathPetruPopa
UiPathPetruPopa marked this pull request as ready for review September 3, 2026 09:09
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The code depends on SDK support for entry_point_path, but the dependency floors are not raised in this PR, so merging as-is risks the configured entry point being silently ignored on older supported versions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the process tool factory to propagate a user-selected process entry point into the UiPath StartJobs call and exposes that value in tool metadata, so process tools run the configured entry point rather than the release default.

Changes:

  • Read entry_point_path from stored tool properties (via getattr) and forward it into client.processes.invoke_async(...).
  • Add entry_point_path to tool metadata for observability/telemetry.
  • Extend and update process/flow/function tool tests to assert the new kwarg is forwarded (including None defaults) and metadata includes the configured entry point.
File summaries
File Description
src/uipath_langchain/agent/tools/process_tool.py Forwards entry_point_path to invoke_async and includes it in tool metadata.
tests/agent/tools/test_process_tool.py Adds/updates assertions to cover entry_point_path forwarding and metadata exposure.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 97 to +101
attachments=attachments,
parent_span_id=parent_span_id,
parent_operation_id=parent_operation_id,
run_as_me=True if run_as_me else None,
entry_point_path=entry_point_path,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and it is the same blocker as the thread above: the floors cannot be raised to a version that does not exist yet. #1866 in uipath-python adds the field; once it merges and publishes, the floors go up in the same change that drops the defensive getattr. Leaving this open until then.

# Conflicts:
#	src/uipath_langchain/agent/tools/process_tool.py
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants