You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/16 13:06:22 UTC

[GitHub] [airflow] aspain opened a new issue, #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

aspain opened a new issue, #24494:
URL: https://github.com/apache/airflow/issues/24494

   ### Apache Airflow version
   
   2.3.2 (latest released)
   
   ### What happened
   
   When using the [GoogleDriveToLocalOperator](https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/transfers/gdrive_to_local.py) I receive the below error: 
   
   ```
     File "/usr/local/lib/python3.9/site-packages/airflow/models/connection.py", line 430, in get_connection_from_secrets
       raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined")
   airflow.exceptions.AirflowNotFoundException: The conn_id `google_cloud_default` isn't defined
   ```
   
   but it doesn't appear that you can add a `gcp_conn_id` parameter - I receive an error if I try to do this
   
   ### What you think should happen instead
   
   Not entirely sure but possibly this operator should have a [gcp_conn_id](https://github.com/apache/airflow/blob/10aa24ae1ce923a4188aa41fbbe561b7bbfe7f68/airflow/providers/google/cloud/transfers/gdrive_to_gcs.py#L43) param similar to the GoogleDriveToGCSOperator
   
   ### How to reproduce
   
   Set up a task similar to the below - ensuring the service account has access to the shared folder being accessed
   
   ```
       download_from_gdrive_to_local = GoogleDriveToLocalOperator(
           task_id="download_from_gdrive_to_local",
           folder_id="0ACWYrvwOWlMsUk9PVA",
           file_name="abc.txt",
           output_file="/tmp/abc.txt",
       )
   ```
   
   ### Operating System
   
   macOS 11.5.2
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-google - version 6.8.0
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   using `astro-runtime:5.0.3`
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] aspain closed issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
aspain closed issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param
URL: https://github.com/apache/airflow/issues/24494


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] antasmishra commented on issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
antasmishra commented on issue #24494:
URL: https://github.com/apache/airflow/issues/24494#issuecomment-1160448719

   I too faced almost a similar issue when using google_cloud_default. When pressing the 'Test' button, there is a red area on top with no message. On [Right Click] + [Inspect] on area, it says `The conn_id `test` isn't defined`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] josh-fell commented on issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
josh-fell commented on issue #24494:
URL: https://github.com/apache/airflow/issues/24494#issuecomment-1157732192

   Indeed this operator missing a `gcp_conn_id` param to pass to the `GoogleDriveHook`. By default the `gcp_conn_id` used is "google_cloud_default" in the hook, but it can't be overwritten. I assume in this situation there was a conn ID setup that isn't named "google_cloud_default".
   
   Would you like to take a crack at this one @aspain?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] aspain commented on issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
aspain commented on issue #24494:
URL: https://github.com/apache/airflow/issues/24494#issuecomment-1171654990

   PR has been merged 👍 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] aspain commented on issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
aspain commented on issue #24494:
URL: https://github.com/apache/airflow/issues/24494#issuecomment-1158027622

   👍 will take a stab at it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] aspain closed issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
aspain closed issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param
URL: https://github.com/apache/airflow/issues/24494


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] aspain commented on issue #24494: `GoogleDriveToLocalOperator` gives conn_id error despite not taking conn_id as a param

Posted by GitBox <gi...@apache.org>.
aspain commented on issue #24494:
URL: https://github.com/apache/airflow/issues/24494#issuecomment-1164710962

   @josh-fell I created PR https://github.com/apache/airflow/pull/24622 to resolve this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org