You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/06/26 14:32:00 UTC

[jira] [Updated] (AIRFLOW-1773) Mark Success when past=True updates no tasks

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

Ash Berlin-Taylor updated AIRFLOW-1773:
---------------------------------------
    Labels:   (was: newbie)

> Mark Success when past=True updates no tasks
> --------------------------------------------
>
>                 Key: AIRFLOW-1773
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1773
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: api
>    Affects Versions: 1.8.2
>            Reporter: Winty
>            Assignee: Winty
>            Priority: Major
>         Attachments: 22.jpg, 33.jpg
>
>
> - When I click [Mark Success], there is no task instances 
> !33.jpg|thumbnail!
> so I try to find what is problem. and i can find somthing wrong.
> airflow / api / common / experimental / mark_tasks.py
> {code:python}
> def set_state(task, execution_date, upstream=False, downstream=False,
>               future=False, past=False, state=State.SUCCESS, commit=False):
> ...
>     if dag.schedule_interval == '@once':
>         dates = [start_date]
>     else:
>         dates = dag.date_range(start_date=start_date, end_date=end_date)
> ...
>     # verify the integrity of the dag runs in case a task was added or removed
>     # set the confirmed execution dates as they might be different
>     # from what was provided
>     confirmed_dates = []
>     drs = DagRun.find(dag_id=dag.dag_id, execution_date=dates)
>     for dr in drs:
>         dr.dag = dag
>         dr.verify_integrity()
>         confirmed_dates.append(dr.execution_date)
> {code}
> the drs is empty. because DagRun.find() with 'execution_date' is find same in DagRuns exactly. but, dag.date_range() make times upper second like 
> [...datetime.datetime(2017, 11, 1, 11, 30), datetime.datetime(2017, 11, 1, 12, 0), dateti
> me.datetime(2017, 11, 1, 12, 30), datetime.datetime(2017, 11, 1, 13, 0), datetime.datetime(2
> 017, 11, 1, 13, 30), datetime.datetime(2017, 11, 1, 14, 0)...]
> !22.jpg|thumbnail!
> so DagRun.find() can not find dags.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)