Skip to content

fix: Improve the Google Drive / Sharepoint / OneDrive connector's validation and sync#421

Merged
pushkala-datastax merged 4 commits into
mainfrom
fix-gdrive-connector
Nov 19, 2025
Merged

fix: Improve the Google Drive / Sharepoint / OneDrive connector's validation and sync#421
pushkala-datastax merged 4 commits into
mainfrom
fix-gdrive-connector

Conversation

@erichare
Copy link
Copy Markdown
Collaborator

This pull request improves the robustness and clarity of the Google Drive connector by adding better error handling, initialization checks, and more informative logging. The changes help prevent issues related to uninitialized services, stale shortcut data, and unclear authentication failures, making debugging and user experience smoother.

Error handling and initialization checks:

  • Added checks to ensure self.service is initialized before performing operations like listing children, downloading files, resolving shortcuts, and listing files. Raises clear runtime errors if not initialized. [1] [2] [3] [4]
  • In load_credentials, added handling for failed refresh token scenarios: clears credentials, removes invalid token file, and raises a clear error message prompting re-authentication.

Shortcut cache management:

  • Introduced _clear_shortcut_cache() and ensured the shortcut cache is cleared at the start of _iter_selected_items to prevent stale shortcut resolution. [1] [2]

Improved logging and error surfacing:

  • Enhanced logging to provide warnings when no files or folders are selected, or when no files are found after expansion/filtering, including possible reasons. [1] [2]
  • Changed list_files to log errors with stack traces and re-raise exceptions, surfacing authentication and permission issues instead of silently swallowing them.

@erichare erichare linked an issue Nov 19, 2025 that may be closed by this pull request
@erichare erichare changed the title fix: Improve the Google Drive connector's validation and sync fix: Improve the Google Drive / Sharepoint / OneDrive connector's validation and sync Nov 19, 2025
@erichare erichare marked this pull request as ready for review November 19, 2025 20:48
@pushkala-datastax pushkala-datastax merged commit c7a8e89 into main Nov 19, 2025
1 check failed
@msmygit msmygit deleted the fix-gdrive-connector branch November 19, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google/Sharepoint/OneDrive - Connectors not working

2 participants