Skip to content

Google provider doesn't let uploading file to a shared drive #29552

@aru-trackunit

Description

@aru-trackunit

Apache Airflow Provider(s)

google

Versions of Apache Airflow Providers

apache-airflow-providers-google: version 8.9.0

Apache Airflow version

2.5.1

Operating System

Linux - official airflow image from docker hub apache/airflow:slim-2.5.1

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

Not sure if it's a bug or a feature.

Originally I have used LocalFilesystemToGoogleDriveOperator to try uploading a file into a shared Google Drive without success.
Provider didn't find a directory with a given name so it created a new one without browsing shared drives. Method call that doesn't allow to upload it is here:
https://github.com/apache/airflow/blob/main/airflow/providers/google/suite/hooks/drive.py#L223

What you think should happen instead

It would be nice if there was an optional parameter to provide a drive_id into which user would like to upload a file. With the same directory check behaviour that already exists but extended to shared drives

How to reproduce

  1. Create a directory on the shared google drive
  2. Fill LocalFilesystemToGoogleDriveOperator constructor with the arguments.
  3. Execute the function

Anything else

I am willing to submit a PR but I would need to know more details, your thoughts, expectations of the implementation to make as little iteration on it possible.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions