Skip to content
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

refactor: refactoring google_drive connector, support token_refresh, … #61

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

medcl
Copy link
Member

@medcl medcl commented Jan 20, 2025

What does this PR do

This pull request includes several changes to improve the Google Drive connector and other components. The most important changes include enhancements to the OAuth flow, modifications to the data source structure, and updates to the search functionality.

Google Drive Connector Enhancements:

  • Updated the OAuth flow to include additional scopes for accessing user profile information and added logic to handle the refresh token (plugins/connectors/google_drive/api.go, plugins/connectors/google_drive/plugin.go). [1] [2] [3] [4] [5] [6]
  • Implemented logic to fetch and store user info from Google during the OAuth redirection process (plugins/connectors/google_drive/api.go).
  • Added functionality to retrieve and index all directories and files from Google Drive, including handling the root folder and directory mapping (plugins/connectors/google_drive/files.go). [1] [2] [3] [4] [5]

Data Source Structure Modifications:

  • Changed the Config field in the ConnectorConfig struct from map[string]interface{} to interface{} to allow more flexible configurations (modules/common/datasource.go).

Search Functionality Updates:

  • Added a new parameter rich_category to the search API and included logic to handle this parameter in search queries (modules/search/search.go). [1] [2]

Documentation Updates:

  • Updated the Google Drive connector documentation to reflect the new OAuth flow and configuration changes (docs/content.en/docs/references/connectors/google_drive.md). [1] [2]

Additional Changes:

  • Included new imports and logging in the Google Drive connector to support the enhancements (plugins/connectors/google_drive/api.go). [1] [2]

These changes aim to enhance the functionality and reliability of the Google Drive connector, improve the flexibility of data source configurations, and extend the search capabilities.

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@RainyNight9 RainyNight9 merged commit edf3055 into main Jan 20, 2025
2 checks passed
@RainyNight9 RainyNight9 deleted the google_drive_folders branch January 20, 2025 12:46
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.

2 participants