turbaszek opened a new pull request #11396:
URL: https://github.com/apache/airflow/pull/11396


   This PR introduces `supervising_job_id` column in DagRun table that links a 
DagRun to job that is supervising it.
   Part of #11302 
   
   Running this query:
   ```sql
   select 
          dr.dag_id, 
          dr.run_id, 
          dr.state, 
          dr.supervising_job_id, 
          j.id, 
          j.job_type, 
          j.latest_heartbeat, 
          j.state 
   from dag_run dr join job j on dr.supervising_job_id = j.id
   ```
   gives the following result:
   <img width="1503" alt="Screenshot 2020-10-10 at 12 32 13" 
src="https://user-images.githubusercontent.com/9528307/95652939-0873bc80-0af5-11eb-8cef-4a6aff61ad2c.png";>
   
   The last row represents a BackfillJob that was killed externally and is 
related to a zombie DagRun that is and will be in a running state unless 
someone fixes it. In the follow-up PR I would like to address removing such 
zombies. 
   
   ---
   **^ 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:
[email protected]


Reply via email to