airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ash Berlin-Taylor (Jira)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-4482) Add execution_date to trigger DAG run API response
Date Wed, 18 Dec 2019 11:11:01 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-4482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ash Berlin-Taylor updated AIRFLOW-4482:
---------------------------------------
    Fix Version/s:     (was: 2.0.0)
                   1.10.6

> Add execution_date to trigger DAG run API response
> --------------------------------------------------
>
>                 Key: AIRFLOW-4482
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4482
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: 1.10.3
>            Reporter: Pavel Shuvalov
>            Assignee: Pavel Shuvalov
>            Priority: Major
>             Fix For: 1.10.6
>
>
> We are using experimental REST API for automating Airflow from Jenkins and our workflow
looks like this:
>  * Jenkins job triggers DAG run (using _POST /api/experimental/dags/*<dag_id>*/dag_runs_)
>  * Airflow API returns response like this: 
> {code:java}
>  {"message":"Created <DagRun dag_id @ 2019-05-08 11:42:43+00:00: run_id, externally
triggered: True>"}  {code}
>  * Jenkins job parses the response for _*execution_date*_ (2019-05-08T11:42:43 for response
above)
>  * Jenkins job further uses execution_date to check DAG run state using _POST /api/experimental/dags/*<dag_id>*/dag_runs/*<execution_date>*_
>  * Also Jenkins job generates DAG run UI link
> Here is [the code|https://github.com/doublescoring/jenkins-pipeline-goodness/blob/master/src/main/groovy/airflow.groovy].
> Actually it is not a good idea to parse message string for execution_date. So it is proposed
to add _*execution_date*_ in DAG run trigger API response as a field. It makes it possible
to get execution_date directly from the response without dirty and unpredictable parsing.
After this improvement API response will be like this:
>  
> {code:java}
> {'execution_date': '2019-05-08T07:03:09+00:00', 'message': 'Created <DagRun dag_id
@ 2019-05-08 07:03:09+00:00: manual__2019-05-08T07:03:09+00:00, externally triggered: True>'}
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message