Update dag endpoint tests to include dags with deadlines
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 484
Description
### Description
Need to update tests to create DAGs with deadlines as below:
```
with dag_maker(
DAG1_ID,
dag_display_name=DAG1_DISPLAY_NAME,
schedule=None,
start_date=DAG1_START_DATE,
doc_md="details",
default_args={
"depends_on_past": False,
"retries": 1,
"retry_delay": timedelta(minutes=5),
},
deadline=[DeadlineAlert(
reference=DeadlineReference.DAGRUN_LOGICAL_DATE,
interval=timedelta(hours=1),
callback="dummy.callback",
)],
params={"foo": 1},
tags=["example"],
):
EmptyOperator(task_id=TASK_ID)
```
### Use case/motivation
_No response_
### Related issues
related to https://github.com/apache/airflow/issues/50574
### Are you willing to submit a PR?
- [x] 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)
Contributor guide
Research direction
Locate the DAG endpoint tests and their existing dag_maker fixtures, then read how the test DAGs are constructed. Update the relevant fixture to include a DeadlineAlert with the shown reference, interval, and callback, and run the targeted endpoint tests to confirm DAGs with deadlines are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100