Skip to content

feat: mirror GetUserAccessToken in the Python job-api IPC contract - #1915

Merged
erghe merged 2 commits into
mainfrom
feat/python-job-api-user-token
Oct 2, 2026
Merged

erghe merged 2 commits into
mainfrom
feat/python-job-api-user-token

Conversation

@erghe

@erghe erghe commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds GetUserAccessToken and PythonUserAccessTokenRequestDto to the IPythonJobApi contract, so a job can later ask the handler for a user access token, optionally with its own scopes. Nothing calls it yet. Server side: UiPath/hdens#8253.

The method isn't abstract because the fakes in tests/cli/test_job_api.py subclass IPythonJobApi; the IPC proxy forwards any method on the class, so the body never runs.

just lint, just format and mypy src tests pass. Rebased onto main and bumped to 2.14.31, with uv.lock regenerated.

🤖 Generated with Claude Code

@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Sep 28, 2026
@erghe
erghe marked this pull request as ready for review September 29, 2026 11:35
Copilot AI balanced review requested due to automatic review settings September 29, 2026 11:35

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

The new wire DTO and non-abstract proxy method lack contract tests, and the acknowledged package version bump remains outstanding.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Mirrors the user access-token operation in the Python job API IPC contract.

Changes:

  • Adds the token request DTO with optional scopes.
  • Adds non-abstract GetUserAccessToken forwarding.
File Description
packages/​uipath/​src/​uipath/​_cli/​_job_api.py Extends the IPC contract for user access tokens.

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

Comment on lines +68 to +73
class PythonUserAccessTokenRequestDto:
"""A token request; field names are the wire keys (do not rename)."""

jobKey: str
resumeVersion: int | None = None
scopes: str | None = None
Comment on lines +112 to +114
async def GetUserAccessToken(self, request: PythonUserAccessTokenRequestDto) -> str:
"""Request a user access token for the job; empty scopes means the job's default scopes."""
raise NotImplementedError
@github-actions

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 →

@github-actions

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 →

@erghe
erghe force-pushed the feat/python-job-api-user-token branch from a2bbd46 to 7edd94c Compare October 2, 2026 10:08
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

@erghe
erghe merged commit c253dcf into main Oct 2, 2026
182 checks passed
@erghe
erghe deleted the feat/python-job-api-user-token branch October 2, 2026 10:20
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 test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants