Repository navigation
fix(buckets): find files in exists_file when fullPath has no leading slash - #1958
Conversation
d1f14ab to
ceb16e5
Compare
🚨 Heads up:
|
🚨 Heads up:
|
ceb16e5 to
07f679e
Compare
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the bucket path-normalization change.
No open issues 🎉
What changed in this PR
Fixes #1957 by making synchronous and asynchronous bucket file-existence checks match paths with or without a leading slash.
Changes:
- Removes one leading slash from both paths before comparison, leaving the
ListFilesprefix query unchanged. - Updates test fixtures to match Orchestrator responses and tests caller paths with and without a leading slash.
- Bumps
uipath-platformto 0.3.1 and updates both lockfiles.
| File | Description |
|---|---|
packages/uipath/uv.lock |
Updates the platform dependency version to 0.3.1. |
packages/uipath-platform/uv.lock |
Records platform version 0.3.1. |
packages/uipath-platform/tests/services/test_buckets_service.py |
Corrects response fixtures and expands leading-slash coverage. |
packages/uipath-platform/src/uipath/platform/orchestrator/_buckets_service.py |
Normalizes path comparisons in both existence-check methods. |
packages/uipath-platform/pyproject.toml |
Bumps the package version to 0.3.1. |
Review effort: Balanced
Worth to change it, it should have no impact but it betters expresses the actual behavior. |
andreitava-uip
left a comment
There was a problem hiding this comment.
please rebase to latest main before merging
…slash exists_file and exists_file_async added a leading "/" to blob_file_path and compared it exactly with the fullPath that ListFiles returns. Orchestrator returns fullPath without a leading "/", so the paths never matched and both methods always returned False. Compare both paths without the leading "/". Fixes #1957 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orchestrator returns fullPath without a leading "/", so the list_files fixtures now match the real API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
07f679e to
5eae693
Compare
|



Fixes #1957 · AGVSOL-9364
What broke:
exists_fileandexists_file_asyncalways returnedFalse, even for a file that is in the bucket. Both methods add a leading/toblob_file_pathand compare the result exactly with thefullPaththatListFilesreturns. Orchestrator returnsfullPathwithout a leading/, so the two never match.The fix: compare both paths without the leading
/.exists_filenow returnsTruewhether or notblob_file_pathstarts with/. TheListFilesprefix query is unchanged, becauseListFilesfinds the file with either prefix.Tests: the
exists_filetests mockedfullPathwith a leading/, which is why they passed while the method was broken. They now mock it without one, as Orchestrator returns it. The found-cases (sync and async) also run with ablob_file_paththat starts with/. Before the fix, 7 of these tests fail; after it, all 2058uipath-platformtests pass.The
list_filestests also mockedfullPathwith a leading/. They now mock it without one, to match the real API.list_filesdoes not compare paths, so this changes no behavior.Bumps
uipath-platformto 0.3.1.🤖 Generated with Claude Code