Skip to content

fix(services/gdrive): stabilize behavior CI semantics#7390

Open
suyanhanx wants to merge 7 commits intomainfrom
fix-gdrive-behavior-ci
Open

fix(services/gdrive): stabilize behavior CI semantics#7390
suyanhanx wants to merge 7 commits intomainfrom
fix-gdrive-behavior-ci

Conversation

@suyanhanx
Copy link
Copy Markdown
Member

@suyanhanx suyanhanx commented Apr 15, 2026

Which issue does this PR close?

Closes #6684.
Closes #7384.

Rationale for this change

Google Drive behavior tests have been unstable because the backend could observe stale path-to-id mappings and stale listings after recent mutations. In addition, Drive can contain duplicate names under the same parent, so blindly taking the first search hit makes path resolution unstable across requests.

What changes are included in this PR?

  • replace the shared PathCacher usage with a gdrive-local path index that supports canonical directory paths, subtree invalidation, and ancestor refresh before re-resolution
  • keep a short-lived recent-mutation view so stat and list stay read-after-write consistent within the same operator session
  • harden read, write, copy, rename, and delete to refresh stale path mappings and retry after 404 from old file ids
  • teach recursive listing to stop traversing tombstoned directories, reset stale page tokens after directory-id refresh, and merge recent entries without duplicates
  • re-enable gdrive behavior planning in CI
  • when duplicate names exist under the same parent, prefer the most recently modified match (falling back to the newer creation time) instead of relying on arbitrary response order
  • document the duplicate-name resolution policy in the gdrive service docs

Are there any user-facing changes?

Users should see more stable gdrive behavior for recursive delete/remove-all flows and for read-after-write/list-after-write cases. If duplicate names exist under the same parent in Google Drive, OpenDAL will now resolve the most recently modified match instead of an arbitrary first result.

AI Usage Statement

Codex with GPT 5.4.

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(services/gdrive): behavior tests can hang across core and bindings bug(services/gdrive): behavior tests failure for Google Drive

1 participant