Skip to content

feat: add AssetsService.exists()#1775

Open
radu-mocanu wants to merge 1 commit into
mainfrom
test/sonarcloud-assets-exists
Open

feat: add AssetsService.exists()#1775
radu-mocanu wants to merge 1 commit into
mainfrom
test/sonarcloud-assets-exists

Conversation

@radu-mocanu

Copy link
Copy Markdown
Collaborator

Summary

  • add exists(name) to AssetsService to check whether an asset exists by name

Copilot AI review requested due to automatic review settings June 30, 2026 14:45

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.

Pull request overview

Adds a new AssetsService.exists(name) API to allow callers to check for an asset by name without retrieving the full asset payload, and bumps the uipath-platform package version accordingly.

Changes:

  • Added AssetsService.exists() implementation using an OData query with top=1.
  • Added unit tests for the new exists() behavior (non-robot path).
  • Bumped uipath-platform version to 0.1.60 and updated lockfiles.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/uipath-platform/src/uipath/platform/orchestrator/_assets_service.py Adds the new exists() method to the Assets service.
packages/uipath-platform/tests/services/test_assets_service.py Adds test cases validating exists() returns True/False for non-robot assets.
packages/uipath-platform/pyproject.toml Bumps package version to 0.1.60.
packages/uipath-platform/uv.lock Updates lockfile to reflect version bump / dependency graph state.
packages/uipath/uv.lock Updates lockfile to reflect the referenced uipath-platform version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +500 to +516
spec = self._list_spec(
folder_path=folder_path,
folder_key=folder_key,
filter=f"Name eq '{name}'",
orderby=None,
skip=0,
top=1,
)
response = self.request(
spec.method,
url=spec.endpoint,
params=spec.params,
content=spec.content,
headers=spec.headers,
json=spec.json,
)
return len(response.json().get("value", [])) > 0
Comment on lines +180 to +184
class TestExistsAsset:
def test_exists_returns_true(
self,
httpx_mock: HTTPXMock,
base_url: str,
@radu-mocanu radu-mocanu force-pushed the test/sonarcloud-assets-exists branch from ad20f1d to bce5e26 Compare June 30, 2026 14:58
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jun 30, 2026
@radu-mocanu radu-mocanu force-pushed the test/sonarcloud-assets-exists branch from bce5e26 to 1a479ce Compare June 30, 2026 15:16
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
40.0% 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