You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Winty (JIRA)" <ji...@apache.org> on 2017/11/01 12:29:00 UTC
[jira] [Created] (AIRFLOW-1773) [Mark Success] not work in UI
Winty created AIRFLOW-1773:
------------------------------
Summary: [Mark Success] not work in UI
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
Priority: Major
Attachments: 22.PNG, 33.PNG
- When I click [Mark Success], there is no task instances
!33.PNG|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.PNG|thumbnail!
so DagRun.find() can not find dags.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)