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/03/03 12:10:10 UTC

[GitHub] [airflow] dinigo opened a new issue #21966: create_build task fails when retrieving the build_id inmediately

dinigo opened a new issue #21966:
URL: https://github.com/apache/airflow/issues/21966


   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   >>> pip show apache-airflow-providers-google
   Name: apache-airflow-providers-google
   Version: 6.3.0
   
   
   ### Apache Airflow version
   
   2.2.3
   
   ### Operating System
   
   Ubuntu 18.04.6 LTS
   
   ### Deployment
   
   Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   When I trigger a build from the CloudBuildHook it always fails. I suspect due to the `build_id` not available when the Hook tries to retrieve it.
   
   1. I call the `create_build()` hook method:
   ```python
       CloudBuildHook().create_build(
               build={
                   # ...
               }
           )
   ```
   
   
   2. [`create_build()` calls `_get_build_id_from_operation()`](https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/hooks/cloud_build.py#L165)
   3. [`_get_build_id_from_operation()` raises "Could not retrieve Build Id from Operation"](https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/hooks/cloud_build.py#L78)
   
   
   
   ### What you expected to happen
   
   For th
   
   ### How to reproduce
   
   Call the `create_build()` hook method:
   ```python
       CloudBuildHook().create_build(
               build={
                   # ...
               }
           )
   ```
   
   ### 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

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



[GitHub] [airflow] dinigo commented on issue #21966: create_build task fails when retrieving the build_id inmediately

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


   I can see on the top of the file the variable `TIME_TO_SLEEP_IN_SECONDS = 5` unused. Could it be that this was used to "sleep" before retrieving the `_id`? 
   
   https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/hooks/cloud_build.py#L33


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