Skip to content

Commit

Permalink
Fix run_type and state param not working due to naming and include re…
Browse files Browse the repository at this point in the history
…maining filter in unit test, make tests use params and parametrize test methods
  • Loading branch information
bugraoz93 committed Dec 21, 2024
1 parent 89771aa commit 69a0e73
Show file tree
Hide file tree
Showing 7 changed files with 863 additions and 21 deletions.
16 changes: 8 additions & 8 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,14 @@ paths:
- type: string
- type: 'null'
title: Root
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: run_type
in: query
required: false
Expand All @@ -407,14 +415,6 @@ paths:
items:
type: string
title: State
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: limit
in: query
required: false
Expand Down
8 changes: 4 additions & 4 deletions airflow/api_fastapi/core_api/routes/ui/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
)
def grid_data(
dag_id: str,
run_types: QueryDagRunRunTypesFilter,
run_states: QueryDagRunStateFilter,
session: SessionDep,
offset: QueryOffset,
request: Request,
run_type: QueryDagRunRunTypesFilter,
state: QueryDagRunStateFilter,
limit: QueryLimit,
order_by: Annotated[
SortParam,
Expand Down Expand Up @@ -99,8 +99,8 @@ def grid_data(
dag_runs_select_filter, _ = paginated_select(
statement=base_query,
filters=[
run_types,
run_states,
run_type,
state,
date_filter,
],
order_by=order_by
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/openapi-gen/queries/prefetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,9 @@ export const prefetchUseBackfillServiceGetBackfill = (
* @param data.logicalDateGte
* @param data.logicalDateLte
* @param data.root
* @param data.offset
* @param data.runType
* @param data.state
* @param data.offset
* @param data.limit
* @param data.orderBy
* @returns GridResponse Successful Response
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/openapi-gen/queries/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ export const useBackfillServiceGetBackfill = <
* @param data.logicalDateGte
* @param data.logicalDateLte
* @param data.root
* @param data.offset
* @param data.runType
* @param data.state
* @param data.offset
* @param data.limit
* @param data.orderBy
* @returns GridResponse Successful Response
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/openapi-gen/queries/suspense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,9 @@ export const useBackfillServiceGetBackfillSuspense = <
* @param data.logicalDateGte
* @param data.logicalDateLte
* @param data.root
* @param data.offset
* @param data.runType
* @param data.state
* @param data.offset
* @param data.limit
* @param data.orderBy
* @returns GridResponse Successful Response
Expand Down
4 changes: 2 additions & 2 deletions airflow/ui/openapi-gen/requests/services.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,9 @@ export class GridService {
* @param data.logicalDateGte
* @param data.logicalDateLte
* @param data.root
* @param data.offset
* @param data.runType
* @param data.state
* @param data.offset
* @param data.limit
* @param data.orderBy
* @returns GridResponse Successful Response
Expand All @@ -998,9 +998,9 @@ export class GridService {
logical_date_gte: data.logicalDateGte,
logical_date_lte: data.logicalDateLte,
root: data.root,
offset: data.offset,
run_type: data.runType,
state: data.state,
offset: data.offset,
limit: data.limit,
order_by: data.orderBy,
},
Expand Down
Loading

0 comments on commit 69a0e73

Please sign in to comment.