atul-astronomer opened a new issue, #47948:
URL: https://github.com/apache/airflow/issues/47948
### Apache Airflow version
main (development)
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
ExternalTaskSensor with mode='reschedule' raising module 'airflow.settings'
has no attribute 'engine' error
```
Traceback (most recent call last):
File "/opt/airflow/airflow/sensors/base.py", line 206, in
_validate_input_values
if self.reschedule and _is_metadatabase_mysql():
File "/opt/airflow/airflow/sensors/base.py", line 60, in
_is_metadatabase_mysql
if settings.engine is None:
AttributeError: module 'airflow.settings' has no attribute 'engine'
```
### What you think should happen instead?
_No response_
### How to reproduce
Have the below Dag in dags folder and notice import error:
```python
from airflow import DAG
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.sensors.external_task import ExternalTaskMarker,
ExternalTaskSensor
from pendulum import today
start_date = today('UTC').add(days=-1)
with DAG(
dag_id="example_external_task_marker_parent",
start_date=start_date,
schedule=None,
tags=["core"],
) as parent_dag:
# [START howto_operator_external_task_marker]
parent_task = ExternalTaskMarker(
task_id="parent_task",
external_dag_id="example_external_task_marker_child",
external_task_id="child_task1",
)
# [END howto_operator_external_task_marker]
with DAG(
dag_id="example_external_task_marker_child",
start_date=start_date,
schedule=None,
tags=["core"],
) as child_dag:
# [START howto_operator_external_task_sensor]
child_task1 = ExternalTaskSensor(
task_id="child_task1",
external_dag_id=parent_dag.dag_id,
external_task_id=parent_task.task_id,
timeout=600,
allowed_states=["success"],
failed_states=["failed", "skipped"],
mode="reschedule",
)
# [END howto_operator_external_task_sensor]
child_task2 = EmptyOperator(task_id="child_task2")
child_task1 >> child_task2
```
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]