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

feat(services/gdrive): Support shared drives in Google Drive API integration #4591

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

XieJiann
Copy link

@XieJiann XieJiann commented May 10, 2024

close #4576

This PR introduces the capability to work with shared drives in our Google Drive API integration by handling the driveId parameter. This change enables users to specify a shared drive ID that will be used in API requests, allowing operations to be performed on shared drives.

Changes:

  • Added drive_id field to GdriveConfig to store the ID of the shared drive.
  • Implemented drive_id setter method in GdriveBuilder to allow the passing of the drive ID during configuration.
  • Modified GdriveCore to append the drive_id to the URL query parameters if present, also enabling support for all drives with supportsAllDrives=true.

Documentation Reference:
For more information on enabling shared drives, see the official Google documentation: Enabling Shared Drives

Impact:
This enhancement allows our application to interact not just with user-specific drives but also with shared drives, broadening our application's scope in collaborative environments.

@Xuanwo
Copy link
Member

Xuanwo commented May 10, 2024

Thanks a lot for sending this PR!

We don't have the environment to test this change. Would you like to perform the integration tests locally and post the results?

The docs can be found at: https://github.com/apache/opendal/tree/main/core/tests/behavior.

Our CI scripts are at

- name: Setup Test Core
uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }}
- name: Run Test Core
shell: bash
working-directory: core
run: cargo test behavior --features tests,${{ inputs.feature }}
env:
OPENDAL_TEST: ${{ inputs.service }}

@XieJiann
Copy link
Author

Thanks a lot for sending this PR!

We don't have the environment to test this change. Would you like to perform the integration tests locally and post the results?

The docs can be found at: https://github.com/apache/opendal/tree/main/core/tests/behavior.

Our CI scripts are at

- name: Setup Test Core
uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }}
- name: Run Test Core
shell: bash
working-directory: core
run: cargo test behavior --features tests,${{ inputs.feature }}
env:
OPENDAL_TEST: ${{ inputs.service }}

I apologize for the inconvenience, but unfortunately I also don't have access to a Google Shared Drive environment as it requires a business subscription. Is there any way you could provide some assistance or suggest an alternative solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Gdrive shared drives
2 participants