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 /object/grid_data from views to FastAPI #44332

Merged
merged 22 commits into from
Dec 23, 2024

Conversation

bugraoz93
Copy link
Collaborator

@bugraoz93 bugraoz93 commented Nov 25, 2024

closes: #42595


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Nov 25, 2024
@bugraoz93 bugraoz93 added the legacy ui Whether legacy UI change should be allowed in PR label Nov 25, 2024
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.

Nice. A few early comments, but overall looking good.

I'll do a more in depth review when the PR is ready :)

airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/common/parameters.py Outdated Show resolved Hide resolved
@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch 2 times, most recently from 597fed2 to 41e6dca Compare November 27, 2024 02:07
@bugraoz93
Copy link
Collaborator Author

bugraoz93 commented Nov 27, 2024

I addressed the comments. Thanks for the review! Some parts turned out to be more complex than I imagined. It still needs small touches and should be ready with unit tests soon. 😅

@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch from 41e6dca to dc6466d Compare November 28, 2024 00:07
@bugraoz93 bugraoz93 changed the title [WIP] AIP-84 Migrate /object/grid_data from views to FastAPI AIP-84 Migrate /object/grid_data from views to FastAPI Nov 28, 2024
@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch 2 times, most recently from 0642476 to a65e089 Compare December 1, 2024 10:24
@bugraoz93
Copy link
Collaborator Author

@pierrejeambrun this is ready for review. I removed the WIP earlier but forgot to ping you again 😅 Please when you have time, thanks!

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.

Great.

Looking good, just a few suggestions / improvement on the code, but nothing blocking.

I'll also let Brent double check that the interface corresponds to the UI specifications.

airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
tests/api_fastapi/core_api/routes/ui/test_grid.py Outdated Show resolved Hide resolved
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Great work! This will power so much of the new UI!

In the old UI we also included the note for both dag runs and task instances. We should still include it for the new UI.

airflow/ui/openapi-gen/requests/types.gen.ts Outdated Show resolved Hide resolved
airflow/ui/openapi-gen/requests/types.gen.ts Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/grid.py Outdated Show resolved Hide resolved
@bugraoz93
Copy link
Collaborator Author

Great.

Looking good, just a few suggestions / improvement on the code, but nothing blocking.

I'll also let Brent double check that the interface corresponds to the UI specifications.

That sounds amazing! Let me know if I have missed anything, and we can fix it at an early stage.
I will review the comments and adjust the code accordingly in the coming hours. Many thanks for the review and the comments!

@bugraoz93
Copy link
Collaborator Author

Great work! This will power so much of the new UI!

In the old UI we also included the note for both dag runs and task instances. We should still include it for the new UI.

I was writing my message and saw your review now 🙂 Thanks for the review, Brent!

@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch 2 times, most recently from aca5d83 to 46e7fb4 Compare December 5, 2024 00:08
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.

Nice

airflow/api_fastapi/core_api/routes/ui/service/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/core_api/routes/ui/service/grid.py Outdated Show resolved Hide resolved
airflow/api_fastapi/common/parameters.py Outdated Show resolved Hide resolved
airflow/api_fastapi/common/parameters.py Outdated Show resolved Hide resolved
@pierrejeambrun
Copy link
Member

Can you also plug the new common filters include_upstream and include_downstream in structure_data (structure.py)

@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch from 46e7fb4 to fdf2fa9 Compare December 8, 2024 21:22
@bugraoz93
Copy link
Collaborator Author

Can you also plug the new common filters include_upstream and include_downstream in structure_data (structure.py)

I already included this in the previous commit, updating that endpoint params according to changes on those command upstream|downstream variables :)

@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch from 69a0e73 to 8cd110d Compare December 22, 2024 22:51
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.

Code and test cases look good, beside the couple of nits, ready to merge.

airflow/api_fastapi/common/parameters.py Outdated Show resolved Hide resolved
…se SortParam rather than order_expressions, remove unnecessary version check, include additional checks for MappedTaskGroups, Move include upstream and downstream to parameters.py, remove unrelated comment and include task and dagrun notes
…t_param, remove unreachable statement from parameters.py::_transform_ti_states, make include upstream/downstream Annotated optional and include new test for upstream/downstream
…ix loop order for calculating overall_state, fix sorting and include user to pass it as parameter and include new test for order_by
…ty, decide the order_by with first element of timetable.run_ordering, add __or__ method to SortParam, calculate overall_ti_state after proper additions in child_states, add more test cases around order_by, limit, filtering such as logical_date_gte/lte, make test 3 depth nested task group
…maining filter in unit test, make tests use params and parametrize test methods
@bugraoz93 bugraoz93 force-pushed the feat/42595/grid-fastapi branch from e4f55fa to f957ac4 Compare December 23, 2024 13:12
@bugraoz93
Copy link
Collaborator Author

Code and test cases look good, beside the couple of nits, ready to merge.

Amazing news, just pushed the changes and resolved the threads. Thanks a lot for your detailed review!

@pierrejeambrun pierrejeambrun merged commit 43d7c1c into apache:main Dec 23, 2024
49 checks passed
@pierrejeambrun
Copy link
Member

cc: @bbovenzi just merged. Hoping this can enable further development for the front end side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues legacy ui Whether legacy UI change should be allowed in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIP-84 Migrate /object/grid_data from views to FastAPI
3 participants