Skip to content

fix(buckets): find files in exists_file when fullPath has no leading slash - #1958

Merged
JasperSelmanUiPath merged 2 commits into
mainfrom
fix/buckets-exists-file-leading-slash
Nov 6, 2026
Merged

JasperSelmanUiPath merged 2 commits into
mainfrom
fix/buckets-exists-file-leading-slash

Conversation

@JasperSelmanUiPath

@JasperSelmanUiPath JasperSelmanUiPath commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1957 · AGVSOL-9364

What broke: exists_file and exists_file_async always returned False, even for a file that is in the bucket. Both methods add a leading / to blob_file_path and compare the result exactly with the fullPath that ListFiles returns. Orchestrator returns fullPath without a leading /, so the two never match.

The fix: compare both paths without the leading /. exists_file now returns True whether or not blob_file_path starts with /. The ListFiles prefix query is unchanged, because ListFiles finds the file with either prefix.

Tests: the exists_file tests mocked fullPath with 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 a blob_file_path that starts with /. Before the fix, 7 of these tests fail; after it, all 2058 uipath-platform tests pass.

The list_files tests also mocked fullPath with a leading /. They now mock it without one, to match the real API. list_files does not compare paths, so this changes no behavior.

Bumps uipath-platform to 0.3.1.

🤖 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 Oct 28, 2026
@JasperSelmanUiPath
JasperSelmanUiPath force-pushed the fix/buckets-exists-file-leading-slash branch from d1f14ab to ceb16e5 Compare October 28, 2026 09:39
@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 →

@JasperSelmanUiPath
JasperSelmanUiPath force-pushed the fix/buckets-exists-file-leading-slash branch from ceb16e5 to 07f679e Compare November 5, 2026 10:26
@JasperSelmanUiPath
JasperSelmanUiPath marked this pull request as ready for review November 5, 2026 10:26
Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:26

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.

🟢 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 ListFiles prefix query unchanged.
  • Updates test fixtures to match Orchestrator responses and tests caller paths with and without a leading slash.
  • Bumps uipath-platform to 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

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.

🟢 Approval recommended

No active review issues block approval of the changes aligning bucket file-existence checks with Orchestrator path formats.

No open issues 🎉

Review effort: Balanced

@andreitava-uip

Copy link
Copy Markdown
Contributor

Not changed, for the owners to decide: the list_files and get_files tests in test_buckets_service.py also mock fullPath with a leading / (for example "/data/file1.txt"), which is not what Orchestrator returns. Those methods pass fullPath through without comparing it, so the tests still pass, but the fixtures don't match the real API. I left them as they are. Should they be changed to match?

Worth to change it, it should have no impact but it betters expresses the actual behavior.

@andreitava-uip andreitava-uip 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.

please rebase to latest main before merging

JasperSelmanUiPath and others added 2 commits November 6, 2026 14:16
…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>
@JasperSelmanUiPath
JasperSelmanUiPath force-pushed the fix/buckets-exists-file-leading-slash branch from 07f679e to 5eae693 Compare November 6, 2026 13:17
@JasperSelmanUiPath
JasperSelmanUiPath enabled auto-merge (squash) November 6, 2026 13:36
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@JasperSelmanUiPath
JasperSelmanUiPath merged commit 1392211 into main Nov 6, 2026
179 of 181 checks passed
@JasperSelmanUiPath
JasperSelmanUiPath deleted the fix/buckets-exists-file-leading-slash branch November 6, 2026 13:42
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.

exists_file and exists_file_async never find a file: fullPath has no leading slash

3 participants