Skip to content

AIP-84 Migrate GET Dag Runs endpoint to FastAPI - #43506

Merged
pierrejeambrun merged 13 commits into
apache:mainfrom
rawwar:kalyan/AIP-84/list_dag_runs
Nov 20, 2024
Merged

AIP-84 Migrate GET Dag Runs endpoint to FastAPI#43506
pierrejeambrun merged 13 commits into
apache:mainfrom
rawwar:kalyan/AIP-84/list_dag_runs

Conversation

@rawwar

Copy link
Copy Markdown
Contributor

related to #42701

@boring-cyborgboring-cyborgBot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Oct 30, 2024
Comment threadairflow/api_fastapi/core_api/routes/public/dag_run.py Outdated
@pierrejeambrunpierrejeambrun added the legacy api Whether legacy API changes should be allowed in PR label Nov 15, 2024
@rawwar
rawwarforce-pushed the kalyan/AIP-84/list_dag_runs branch from d893747 to 05aa18eCompareNovember 16, 2024 07:20
@rawwar

rawwar commented Nov 16, 2024

Copy link
Copy Markdown
ContributorAuthor

@pierrejeambrun , as of now get dag runs does not raise 404 not found if dag id is invalid. Link.

Should we update it?

@pierrejeambrun

pierrejeambrun commented Nov 18, 2024

Copy link
Copy Markdown
Member

@pierrejeambrun , as of now get dag runs does not raise 404 not found if dag id is invalid. Link.

Should we update it?

I think we should update it in the new FastAPI endpoint, I wouldn't bother fixing the legacy one though (it's not really a bug, more of an imprecision I would say, we can live with that in airflow 2.x). We can do the same as in get_tasks.

"""Get tasks for DAG."""dag: DAG=request.app.state.dag_bag.get_dag(dag_id)
ifnotdag:
raiseHTTPException(status.HTTP_404_NOT_FOUND, f"Dag with id {dag_id} was not found")

@rawwar
rawwar marked this pull request as ready for review November 18, 2024 19:09
Comment threadtests/api_fastapi/core_api/routes/public/test_dag_run.py
Comment threadairflow/api_fastapi/core_api/routes/public/dag_run.py Outdated

@pierrejeambrunpierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added a really small tweak commit, ready to merge. (I didn't confirm my previous code review so the feedback never came through 🤦)

Thanks!

@pierrejeambrun
pierrejeambrunforce-pushed the kalyan/AIP-84/list_dag_runs branch from c2da15e to 273a6d7CompareNovember 20, 2024 16:46
@pierrejeambrun
pierrejeambrun merged commit 175b960 into apache:mainNov 20, 2024
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
* add list_dag_runs
* use logical_date
* add tests
* wip - writing tests
* add tests
* fix tests
* Update airflow/api_fastapi/core_api/routes/public/dag_run.py
* add status
* Small tweak
---------
Co-authored-by: pierrejeambrun <pierrejbrun@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:APIAirflow's REST/HTTP APIarea:UIRelated to UI/UX. For Frontend Developers.legacy apiWhether legacy API changes should be allowed in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rawwar@pierrejeambrun@bugraoz93