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 2021/05/08 10:10:19 UTC

[GitHub] [airflow] sjvanrossum opened a new pull request #15738: Fix argument ordering and type of bucket and object

sjvanrossum opened a new pull request #15738:
URL: https://github.com/apache/airflow/pull/15738


   This fixes the argument ordering of bucket_name and object_name in GCSHook.download.
   All other methods defined on GCSHook have bucket_name before object_name except download.
   GoogleCloudStorageHook.download in Airflow 1.0 also defined bucket_name first instead of object_name.
   
   Using object_name, bucket_name causes an issue in BigQueryCreateExternalTableOperator and mlengine_operator_utils.create_evaluate_ops where the parameters to GCSHook.download in those operators are passed positionally.
   
   Additionally, bucket_name is not an optional parameter in the underlying API and is not represented as such in other methods of GCSHook.
   
   Found this while debugging a workflow using BigQueryCreateExternalTableOperator with @FedericaLionetto and stumbling on this log line:
   ```
   google.api_core.exceptions.NotFound: 404 GET https://storage.googleapis.com/download/storage/v1/b/OBJECT_NAME_REDACTED/o/BUCKET_NAME_REDACTED?alt=media: Not Found: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>
   ```
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.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.

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



[GitHub] [airflow] potiuk merged pull request #15738: Fix argument ordering and type of bucket and object

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15738:
URL: https://github.com/apache/airflow/pull/15738


   


-- 
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.

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