Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from
Nov 20, 2024

Conversation

rawwar
Copy link
Collaborator

@rawwar rawwar commented Oct 30, 2024

related to #42701

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Oct 30, 2024
@pierrejeambrun pierrejeambrun added the legacy api Whether legacy API changes should be allowed in PR label Nov 15, 2024
@rawwar rawwar force-pushed the kalyan/AIP-84/list_dag_runs branch from d893747 to 05aa18e Compare November 16, 2024 07:20
@rawwar
Copy link
Collaborator Author

rawwar commented Nov 16, 2024

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

Should we update it?

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Nov 18, 2024

@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)
    if not dag:
        raise HTTPException(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
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

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 pierrejeambrun force-pushed the kalyan/AIP-84/list_dag_runs branch from c2da15e to 273a6d7 Compare November 20, 2024 16:46
@pierrejeambrun pierrejeambrun merged commit 175b960 into apache:main Nov 20, 2024
62 checks passed
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 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 <[email protected]>
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 <[email protected]>
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 area:UI Related to UI/UX. For Frontend Developers. legacy api Whether legacy API changes should be allowed in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants