Open armandduijn opened 3 months ago
hi @eladkal , Would you please assign this issue .I want to contribute as my first contribution and I assure you I will complete as soon as possible.
Assigned
I was planning on working on this but happy to see that @Prab-27 is going to be contributing towards this.
In any case, my original plan was to fix this by following:
_check_for_existence
method from the ExternalTaskSensor
to a shared location (potentially in the airflow/airflow/utils/
) and call it the check_for_existence
method. Make changes in the ExternalTaskSensor
, because of this changeWorkflowTrigger
with a new keyword argument check_existence
. It is False
by default, but is being set by the check_existence
in ExternalTaskSensor
.async run
of the WorkflowTrigger
, call the check_for_existence
if check_existence
is True. This step will raise an AirflowException
is the DAG/task_id/task_group_id is not foundDo you agree with that solution @potiuk ?
Do you agree with that solution @potiuk ?
As usual - seing the PR is best - we can discuss it there, it's usually better than discussing it "dry" :)
Apache Airflow version
2.9.2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
The ExternalTaskSensor in deferrable mode doesn't throw an error if the external DAG doesn't exist. Setting
check_existence=True
doesn't have an effect.What you think should happen instead?
The task should immediately fail instead of staying in the deferred state.
How to reproduce
The code below implements a DAG with two ExternalTaskSensor tasks. One task is set to be deferred and the other one is old non-deferred way.
When running the DAG, the
regular_sensor
task will immediately retry and eventually fail, while thedefer_sensor
task will remain deferred.Operating System
Windows
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct