potiuk edited a comment on issue #20982:
URL: https://github.com/apache/airflow/issues/20982#issuecomment-1020504118
> @potiuk I will take a look at it. I am not that familiar with the inner
workings of airflow, but I think that the query for orphaned tasks is wrong. At
the moment it does: `session.query(TI) .filter(TI.state.in_(resettable_states))
.outerjoin(TI.queued_by_job) .filter(or_(TI.queued_by_job_id.is_(None),
SchedulerJob.state != State.RUNNING)) .join(TI.dag_run) .filter(
DagRun.run_type != DagRunType.BACKFILL_JOB, DagRun.state == State.RUNNING, )`
and I think that in my case the DagRun.run_type == DagRunType.Manual. I will
validate this and supply a fix for it.
I think it ain't so easy. Unlike backfills (controlled by the client
`airflow backfill` command) , the manual runs are also "controlled" by
scheduler - same as regular runs. That's why backfills are excluded in this
query.
I have a feeling this is more a problem with kubernetes_executor's adoption
code which uses labels:
https://github.com/apache/airflow/blob/1169e3a81f5481e92d29e174163eb5e6d7f3fe93/airflow/executors/kubernetes_executor.py#L678
But this is more of an intuition than looking at the code yet.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]