Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AIP-84 Migrate /object/grid_data from views to FastAPI (#44332)
* Include grid endpoint to FastAPI * Finalise the endpoint other than dynamically created tasks and address comments * Finalise the endpoint with dynamically mapped tasks and include unit test * Use SessionDep for session param * Create service/grid.py and move methods, adjust usage of SortParam, use 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 * Fix unit test according to adjustments * Include missing MappedTaskGroup parent check to MappedOperator * Remove remaining version check * Move service/ to services/ui/, make sort_param unique for dag_run_sort_param, remove unreachable statement from parameters.py::_transform_ti_states, make include upstream/downstream Annotated optional and include new test for upstream/downstream * Fix SortParam creation * Revert changes in QueryLastDagRunStateFilter * include missing task_count to parent_node for recursive taskgroups, fix loop order for calculating overall_state, fix sorting and include user to pass it as parameter and include new test for order_by * Rename num_runs to limit for consistency, make base_date filter range query * Fix task_count and states for nested task_groups, add alias to run_id, change types of Pydantic models * Rebase and rerun pre-commit * Change GridTaskInstanceSummary state to TaskInstanceState object * Fix setting state in GridTaskInstanceSummary, change name states to child_states to prevent confusion * Select all model columns, move priority to paramteres as state_priority, 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 * Fix run_type and state param not working due to naming and include remaining filter in unit test, make tests use params and parametrize test methods * Move SortParam not provided comparison logic to view * Remove forgotten code piece * Remove None from param definition, adjust the log of wrong DagRun type in parameters and test
- Loading branch information