Skip to content

Add deadline alert coverage to DAG endpoint tests#64815

Open
shivaam wants to merge 2 commits intoapache:mainfrom
shivaam:feat/dag-endpoint-deadline-tests-50992
Open

Add deadline alert coverage to DAG endpoint tests#64815
shivaam wants to merge 2 commits intoapache:mainfrom
shivaam:feat/dag-endpoint-deadline-tests-50992

Conversation

@shivaam
Copy link
Copy Markdown
Contributor

@shivaam shivaam commented Apr 6, 2026

Summary

  • Add tests verifying all public DAG API endpoints work correctly with deadline-bearing DAGs
  • Cover GET /dags, GET /dags/{id}, GET /dags/{id}/details, PATCH /dags/{id}, PATCH /dags, and DELETE /dags/{id}
  • Add clear_db_deadline and clear_db_deadline_alert to test cleanup to prevent FK constraint issues

Details

The public DAG endpoint tests (test_dags.py) never created DAGs with deadlines, so there was zero coverage for how the API behaves when DagModel._deadline has data and SerializedDagModel.deadline_alerts has FK-linked records.

7 new test methods across 6 test classes. No existing tests modified.

Note: DAGResponse and DAGDetailsResponse do not yet include deadline fields (that work is tracked separately in #50574), so these tests verify the endpoints return correct responses without errors — not the deadline data itself. Once response fields are added, these tests can be extended with deadline-specific assertions.

closes: #50992


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.6)

Generated-by: Claude Code (Opus 4.6) following the guidelines

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Apr 6, 2026
@shivaam shivaam marked this pull request as ready for review April 6, 2026 22:04
@kaxil kaxil requested a review from Copilot April 10, 2026 19:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update dag endpoint tests to include dags with deadlines

2 participants