feat: add AssetsService.exists()#1775
Open
radu-mocanu wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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 withtop=1. - Added unit tests for the new
exists()behavior (non-robot path). - Bumped
uipath-platformversion to0.1.60and 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, |
ad20f1d to
bce5e26
Compare
bce5e26 to
1a479ce
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.


Summary
exists(name)toAssetsServiceto check whether an asset exists by name