Repository navigation
feat(ontology): add an Ontology service client to uipath-platform [DS-9950] #1999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f55a964
feat(ontology): add an Ontology service client to uipath-platform [DS…
36c47ee
refactor(ontology): drop the limit and offset arguments from execute_sql
c143bab
fix(ontology): report skipped artifacts, download in parallel, send a…
255913b
feat(ontology): download a single-file artifact by type in one request
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
9 changes: 7 additions & 2 deletions
9
packages/uipath-platform/src/uipath/platform/entities/_entity_ontology_service.py
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
36 changes: 36 additions & 0 deletions
36
packages/uipath-platform/src/uipath/platform/ontology/__init__.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| """Ontology service package. | ||
|
|
||
| Provides the ``OntologyService`` client for reading a deployed ontology by id, | ||
| downloading the artifact files it was installed from, reading its graph and | ||
| running SQL over its objects, plus the Pydantic models for those answers. | ||
| """ | ||
|
|
||
| from ._ontology_service import ( | ||
| DEFAULT_MAX_ARTIFACT_BYTES, | ||
| OntologyService, | ||
| ) | ||
| from .ontology import ( | ||
| ONTOLOGY_DEPLOYED_STATE, | ||
| ArtifactDownload, | ||
| OntologyArtifact, | ||
| OntologyArtifactContent, | ||
| OntologyArtifactIntegrityError, | ||
| OntologyDetails, | ||
| SkippedArtifact, | ||
| SqlColumn, | ||
| SqlResult, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "ArtifactDownload", | ||
| "DEFAULT_MAX_ARTIFACT_BYTES", | ||
| "ONTOLOGY_DEPLOYED_STATE", | ||
| "OntologyArtifact", | ||
| "OntologyArtifactContent", | ||
| "OntologyArtifactIntegrityError", | ||
| "OntologyDetails", | ||
| "OntologyService", | ||
| "SkippedArtifact", | ||
| "SqlColumn", | ||
| "SqlResult", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question on the folder value this override will carry at runtime.
GenericResourceOverwriteonly hasfolderPath, and the decorator onOntologyServicesends that straight through as the folder path header, which the Ontology service resolves via Orchestrator and 404s (FOLDER_NOT_FOUND) when it doesn't match a path.The Agents packager fills
folderPathfrom the item'sfolderId, and for ontologies that field holds the service'sfolderId, which is the folder key GUID. On the entity side both runtimes already treat that value as an id rather than a path: the C# handler reads thefolderPathkey intooverwriteFolderId, and the Python planner tries path resolution and falls back to using the raw value as a key (#1548 explains why).Do we know the ontology override will always have been rewritten to a real path by the time it reaches
resourceOverwrites? If a GUID can get through (debug runs, or a deploy that keeps the default), the decorator should send it asfolder_keyinstead, or the override should acceptfolderIdthe wayEntityResourceOverwritedoes. If Solutions guarantees a path here, a short note on the model would save the next person the same question.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the packager puts the folder key there. If the value is a GUID, it now goes as the folder key instead of the path. Addressed it