utkarsharma2 commented on issue #34497:
URL: https://github.com/apache/airflow/issues/34497#issuecomment-1732909983
@cbuffett I'm not able to reproduce this locally with the latest airflow
code, I ran below code:
```
import datetime
from airflow import DAG
from airflow.sensors.external_task import ExternalTaskSensor
from airflow.models.taskinstance import State
default_args = {
'owner': 'test',
'start_date': datetime.datetime(2023, 1, 1)
}
dag = DAG(dag_id='DAG-1',
default_args=default_args,
schedule_interval='@once',
catchup=False
)
with dag:
external_task_sensor = ExternalTaskSensor(
task_id='external_dag_sensor',
poke_interval=60,
timeout=300,
soft_fail=True,
retries=0,
external_dag_id="some_dag",
execution_date_fn=datetime.datetime(2023, 1, 1),
allowed_states=[State.SUCCESS],
failed_states=[State.FAILED],
mode="reschedule"
)
if __name__ == "__main__" :
dag.test()
```
can you please specify which airflow version you are on?
--
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]