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/07/22 22:13:21 UTC

[GitHub] [airflow] orossini opened a new issue #17180: dag example doesn't work for DataflowJobStatusSensor

orossini opened a new issue #17180:
URL: https://github.com/apache/airflow/issues/17180


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.0.1
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   1.18 on GKE
   **Environment**: Google Cloud Platform - Cloud Composer
   
   - **Cloud provider or hardware configuration**: GCP - Cloud Composer composer-1.17.0-preview.5-airflow-2.0.1
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   <!-- (please include exact error messages if you can) -->
   
   Error in the doc and dag example for DataflowJobStatusSensor
   this generates the following error in the log: 
    {taskinstance.py:1457} ERROR - 'dict object' has no attribute 'job_id'
   
   
   
   **What you expected to happen**:
   XCOM is pulled and dataflow job id should be obtained from XCOM attributes.
   However it is not. An incorrect attribute name is used.
   
   <!-- What do you think went wrong? -->
   the XCOM doesn't have any attribute named "job_id" when using : 
   job_id="{{task_instance.xcom_pull('start-python-job-async')['job_id']}}",
   instead "id" has to be used to get the related Dataflow job id.
   
   **How to reproduce it**:
   
   create a DAG
   add a task to run a dataflow job using DataflowTemplatedJobStartOperator in async mode.
   add task to check for job status using the example code for DataflowJobStatusSensor provided here: 
   https://airflow.apache.org/docs/apache-airflow-providers-google/stable/_modules/airflow/providers/google/cloud/example_dags/example_dataflow.html
   and more precisely here:
   https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/example_dags/example_dataflow.py#L169
   
   
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


-- 
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] eladkal closed issue #17180: dag example doesn't work for DataflowJobStatusSensor

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #17180:
URL: https://github.com/apache/airflow/issues/17180


   


-- 
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] boring-cyborg[bot] commented on issue #17180: dag example doesn't work for DataflowJobStatusSensor

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17180:
URL: https://github.com/apache/airflow/issues/17180#issuecomment-885269793


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] lwyszomi commented on issue #17180: dag example doesn't work for DataflowJobStatusSensor

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


   This was fixed when @mnojek worked on the system tests for the google provider:
   https://github.com/apache/airflow/pull/18494
   
   Documentation have a new example dag with adjustment


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