From 1be4b3e0134610372e7914b2aaef9703babb5132 Mon Sep 17 00:00:00 2001 From: Divya <6883573+gdivya6028@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:46:37 +0530 Subject: [PATCH 1/9] add filter dag tag changes --- .../src/airflow/api_fastapi/core_api/datamodels/dag_run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py index 88ffceca6d7c7..ad1c45e1a582d 100644 --- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py +++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py @@ -30,6 +30,7 @@ from airflow.timetables.base import DataInterval from airflow.utils.state import DagRunState from airflow.utils.types import DagRunTriggeredByType, DagRunType +from airflow.api_fastapi.core_api.datamodels.dag_tags import DagTagResponse if TYPE_CHECKING: from airflow.serialization.definitions.dag import SerializedDAG @@ -111,6 +112,7 @@ class DAGRunResponse(BaseModel): last_scheduling_decision: datetime | None run_type: DagRunType state: DagRunState + tags: list[DagTagResponse] | None = Field(validation_alias=AliasPath("dag_model","tags")) triggered_by: DagRunTriggeredByType | None triggering_user_name: str | None conf: dict | None @@ -159,7 +161,6 @@ class TriggerDAGRunPostBody(StrictBaseModel): data_interval_end: AwareDatetime | None = None logical_date: AwareDatetime | None run_after: datetime | None = Field(default_factory=timezone.utcnow) - conf: dict | None = Field(default_factory=dict) note: str | None = None partition_key: str | None = None From 27c1354363cd9a3ab734a33e5818727dbd2f89f5 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:30:20 +0530 Subject: [PATCH 2/9] add changes --- .../airflow/api_fastapi/core_api/datamodels/dag_run.py | 4 ++-- .../api_fastapi/core_api/routes/public/dag_run.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py index ad1c45e1a582d..56cb953647dbf 100644 --- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py +++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py @@ -26,11 +26,11 @@ from airflow._shared.timezones import timezone from airflow.api_fastapi.core_api.base import BaseModel, StrictBaseModel +from airflow.api_fastapi.core_api.datamodels.dag_tags import DagTagResponse from airflow.api_fastapi.core_api.datamodels.dag_versions import DagVersionResponse from airflow.timetables.base import DataInterval from airflow.utils.state import DagRunState from airflow.utils.types import DagRunTriggeredByType, DagRunType -from airflow.api_fastapi.core_api.datamodels.dag_tags import DagTagResponse if TYPE_CHECKING: from airflow.serialization.definitions.dag import SerializedDAG @@ -112,7 +112,7 @@ class DAGRunResponse(BaseModel): last_scheduling_decision: datetime | None run_type: DagRunType state: DagRunState - tags: list[DagTagResponse] | None = Field(validation_alias=AliasPath("dag_model","tags")) + tags: list[DagTagResponse] | None = Field(validation_alias=AliasPath("dag_model", "tags")) triggered_by: DagRunTriggeredByType | None triggering_user_name: str | None conf: dict | None diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py index 784e549f1be3d..1f36a38f92740 100644 --- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py +++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py @@ -108,6 +108,7 @@ from airflow.exceptions import ParamValidationError from airflow.models import DagModel, DagRun from airflow.models.asset import AssetEvent +from airflow.models.dag import DagTag from airflow.models.dag_version import DagVersion from airflow.utils.state import DagRunState from airflow.utils.types import DagRunTriggeredByType, DagRunType @@ -436,6 +437,10 @@ def get_dag_runs( ], run_type: QueryDagRunRunTypesFilter, state: QueryDagRunStateFilter, + tags: Annotated[ + FilterParam[str | None], + Depends(filter_param_factory(DagTag.name, str | None, FilterOptionEnum.EQUAL, "tags")), + ], dag_version: QueryDagRunVersionFilter, bundle_version: Annotated[ FilterParam[str | None], Depends(filter_param_factory(DagRun.bundle_version, str | None)) @@ -516,6 +521,9 @@ def get_dag_runs( get_latest_version_of_dag(dag_bag, dag_id, session) # Check if the Dag exists. query = query.filter(DagRun.dag_id == dag_id).options() + if tags != "": + query = query.join(DagTag, DagRun.dag_id == DagTag.dag_id) + # Add join with DagVersion if dag_version filter is active if dag_version.value: query = query.join(DagVersion, DagRun.created_dag_version_id == DagVersion.id) @@ -529,6 +537,7 @@ def get_dag_runs( duration_range, conf_contains, state, + tags, run_type, dag_version, bundle_version, From 2b9e58d0e96e9a9aaa065c9738561f95c4218eba Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:30:37 +0530 Subject: [PATCH 3/9] add changes --- .../core_api/openapi/v2-rest-api-generated.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml index 87fc2a858b9bc..838f5289a97ac 100644 --- a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml +++ b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml @@ -2498,6 +2498,14 @@ paths: items: type: string title: State + - name: tags + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tags - name: dag_version in: query required: false @@ -13636,6 +13644,13 @@ components: $ref: '#/components/schemas/DagRunType' state: $ref: '#/components/schemas/DagRunState' + tags: + anyOf: + - items: + $ref: '#/components/schemas/DagTagResponse' + type: array + - type: 'null' + title: Tags triggered_by: anyOf: - $ref: '#/components/schemas/DagRunTriggeredByType' @@ -13689,6 +13704,7 @@ components: - last_scheduling_decision - run_type - state + - tags - triggered_by - triggering_user_name - conf From 777f33eecc9a913ea5ef24b7bcb81f89d22b4f52 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:31:02 +0530 Subject: [PATCH 4/9] add common.ts changes --- airflow-core/src/airflow/ui/openapi-gen/queries/common.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts b/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts index 0933a3fea4d30..cb89432bd523e 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts @@ -147,7 +147,7 @@ export const UseDagRunServiceGetDagRunKeyFn = ({ dagId, dagRunId }: { export type DagRunServiceGetDagRunsDefaultResponse = Awaited>; export type DagRunServiceGetDagRunsQueryResult = UseQueryResult; export const useDagRunServiceGetDagRunsKey = "DagRunServiceGetDagRuns"; -export const UseDagRunServiceGetDagRunsKeyFn = ({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }: { +export const UseDagRunServiceGetDagRunsKeyFn = ({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }: { bundleVersion?: string; confContains?: string; consumingAssetPattern?: string; @@ -191,7 +191,8 @@ export const UseDagRunServiceGetDagRunsKeyFn = ({ bundleVersion, confContains, c updatedAtGte?: string; updatedAtLt?: string; updatedAtLte?: string; -}, queryKey?: Array) => [useDagRunServiceGetDagRunsKey, ...(queryKey ?? [{ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }])]; + tags?: string; +}, queryKey?: Array) => [useDagRunServiceGetDagRunsKey, ...(queryKey ?? [{ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }])]; export type DagRunServiceGetUpstreamAssetEventsDefaultResponse = Awaited>; export type DagRunServiceGetUpstreamAssetEventsQueryResult = UseQueryResult; export const useDagRunServiceGetUpstreamAssetEventsKey = "DagRunServiceGetUpstreamAssetEvents"; From d4a6ada69ea06aad8c212c7d7493fcf29b5beef4 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:31:40 +0530 Subject: [PATCH 5/9] add changes --- .../src/airflow/ui/openapi-gen/queries/ensureQueryData.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts b/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts index 30096ac546b62..3122f14502cd4 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts @@ -343,7 +343,7 @@ export const ensureUseDagRunServiceGetDagRunData = (queryClient: QueryClient, { * @returns DAGRunCollectionResponse Successful Response * @throws ApiError */ -export const ensureUseDagRunServiceGetDagRunsData = (queryClient: QueryClient, { bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }: { +export const ensureUseDagRunServiceGetDagRunsData = (queryClient: QueryClient, { bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }: { bundleVersion?: string; confContains?: string; consumingAssetPattern?: string; @@ -387,7 +387,8 @@ export const ensureUseDagRunServiceGetDagRunsData = (queryClient: QueryClient, { updatedAtGte?: string; updatedAtLt?: string; updatedAtLte?: string; -}) => queryClient.ensureQueryData({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }) }); + tags?: string; +}) => queryClient.ensureQueryData({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }) }); /** * Get Upstream Asset Events * If dag run is asset-triggered, return the asset events that triggered it. From 5b0a28c16fad3548c6a25829e98e095827b73851 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:32:20 +0530 Subject: [PATCH 6/9] add changes --- airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts | 5 +++-- airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts | 5 +++-- .../src/airflow/ui/openapi-gen/requests/services.gen.ts | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts b/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts index 8f78029a31cf0..5bd3a7eac273f 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts @@ -343,7 +343,7 @@ export const prefetchUseDagRunServiceGetDagRun = (queryClient: QueryClient, { da * @returns DAGRunCollectionResponse Successful Response * @throws ApiError */ -export const prefetchUseDagRunServiceGetDagRuns = (queryClient: QueryClient, { bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }: { +export const prefetchUseDagRunServiceGetDagRuns = (queryClient: QueryClient, { bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }: { bundleVersion?: string; confContains?: string; consumingAssetPattern?: string; @@ -387,7 +387,8 @@ export const prefetchUseDagRunServiceGetDagRuns = (queryClient: QueryClient, { b updatedAtGte?: string; updatedAtLt?: string; updatedAtLte?: string; -}) => queryClient.prefetchQuery({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }) }); + tags?: string; +}) => queryClient.prefetchQuery({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }) }); /** * Get Upstream Asset Events * If dag run is asset-triggered, return the asset events that triggered it. diff --git a/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts b/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts index 8f5c660029ce2..3bf007eeeeda6 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts @@ -343,7 +343,7 @@ export const useDagRunServiceGetDagRun = = unknown[]>({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }: { +export const useDagRunServiceGetDagRuns = = unknown[]>({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }: { bundleVersion?: string; confContains?: string; consumingAssetPattern?: string; @@ -387,7 +387,8 @@ export const useDagRunServiceGetDagRuns = , "queryKey" | "queryFn">) => useQuery({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }, queryKey), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte }) as TData, ...options }); + tags?: string; +}, queryKey?: TQueryKey, options?: Omit, "queryKey" | "queryFn">) => useQuery({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }, queryKey), queryFn: () => DagRunService.getDagRuns({ bundleVersion, confContains, consumingAssetPattern, cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagVersion, durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte, offset, orderBy, partitionKeyPattern, partitionKeyPrefixPattern, runAfterGt, runAfterGte, runAfterLt, runAfterLte, runIdPattern, runIdPrefixPattern, runType, startDateGt, startDateGte, startDateLt, startDateLte, state, triggeringUserNamePattern, triggeringUserNamePrefixPattern, updatedAtGt, updatedAtGte, updatedAtLt, updatedAtLte, tags }) as TData, ...options }); /** * Get Upstream Asset Events * If dag run is asset-triggered, return the asset events that triggered it. diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts b/airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts index d69a06aa60cde..39773e693ac33 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts @@ -1127,7 +1127,8 @@ export class DagRunService { dag_id_prefix_pattern: data.dagIdPrefixPattern, partition_key_pattern: data.partitionKeyPattern, partition_key_prefix_pattern: data.partitionKeyPrefixPattern, - consuming_asset_pattern: data.consumingAssetPattern + consuming_asset_pattern: data.consumingAssetPattern, + tags: data.tags, }, errors: { 401: 'Unauthorized', From 68be01a26b8b1c850cb05fb1b687f173471d0878 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:33:08 +0530 Subject: [PATCH 7/9] add changes --- .../src/airflow/ui/openapi-gen/requests/types.gen.ts | 2 ++ .../airflow/ui/public/i18n/locales/en/common.json | 3 ++- .../src/airflow/ui/src/constants/filterConfigs.tsx | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts index 62260fa61135f..44c441c305dea 100644 --- a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts +++ b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts @@ -917,6 +917,7 @@ export type DAGRunResponse = { bundle_version: string | null; dag_display_name: string; partition_key: string | null; + tags?: string; }; /** @@ -3056,6 +3057,7 @@ export type GetDagRunsData = { updatedAtGte?: string | null; updatedAtLt?: string | null; updatedAtLte?: string | null; + tags?: string | null; }; export type GetDagRunsResponse = DAGRunCollectionResponse; diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json index 8eea401e69a81..abb80c2c0cfe4 100644 --- a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json +++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json @@ -401,5 +401,6 @@ "tooltip": "Press {{hotkey}} to toggle wrap", "unwrap": "Unwrap", "wrap": "Wrap" - } + }, + "tags": "tags" } diff --git a/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx b/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx index 6e1c6870cba8d..b8f3699baf207 100644 --- a/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx +++ b/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx @@ -35,6 +35,7 @@ import { import { PiQueue } from "react-icons/pi"; import type { DagRunState, DagRunType, TaskInstanceState } from "openapi/requests/types.gen"; +import {useDagServiceGetDagTags} from 'openapi/queries'; import { DagIcon } from "src/assets/DagIcon"; import { TaskIcon } from "src/assets/TaskIcon"; import type { FilterConfig } from "src/components/FilterBar"; @@ -61,6 +62,8 @@ export enum FilterTypes { export const useFilterConfigs = () => { const { t: translate } = useTranslation(["browse", "common", "components", "admin", "hitl"]); + const {data : dagTags} = useDagServiceGetDagTags({limit : 10, offset : 10, orderBy :["name"]}); + const filterConfigMap = { [SearchParamsKeys.ASSET_EVENT_DATE_RANGE]: { endKey: SearchParamsKeys.END_DATE, @@ -94,6 +97,15 @@ export const useFilterConfigs = () => { placeholder: translate("common:filters.searchAsset"), type: FilterTypes.TEXT, }, + [SearchParamsKeys.TAGS]: { + icon: , + label: translate("common:tags"), + options: dagTags?.tags.map((tag) => ({ + label : tag, + value : tag + })), + type: FilterTypes.SELECT, + }, [SearchParamsKeys.CREATED_AT_RANGE]: { endKey: SearchParamsKeys.CREATED_AT_LTE, icon: , From b5d31bc7d443b8e371e8eb687100edf72eacbe62 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:33:54 +0530 Subject: [PATCH 8/9] add changes --- airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts | 3 ++- airflow-ctl/src/airflowctl/api/datamodels/generated.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts b/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts index ae5f48e5ef19a..6a3daaf41407a 100644 --- a/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts +++ b/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts @@ -99,7 +99,8 @@ export type FilterableSearchParamsKeys = | SearchParamsKeys.TASK_ID_PATTERN | SearchParamsKeys.TRIGGERING_USER_NAME_PATTERN | SearchParamsKeys.TRY_NUMBER - | SearchParamsKeys.USER; + | SearchParamsKeys.USER + | SearchParamsKeys.TAGS; export const useFiltersHandler = (searchParamKeys: Array) => { const { getFilterConfig } = useFilterConfigs(); diff --git a/airflow-ctl/src/airflowctl/api/datamodels/generated.py b/airflow-ctl/src/airflowctl/api/datamodels/generated.py index ec2476ce6abfc..cbd6840ef2691 100644 --- a/airflow-ctl/src/airflowctl/api/datamodels/generated.py +++ b/airflow-ctl/src/airflowctl/api/datamodels/generated.py @@ -1766,6 +1766,7 @@ class DAGRunResponse(BaseModel): last_scheduling_decision: Annotated[datetime | None, Field(title="Last Scheduling Decision")] = None run_type: DagRunType state: DagRunState + tags: Annotated[list[DagTagResponse] | None, Field(title="Tags")] = None triggered_by: DagRunTriggeredByType | None = None triggering_user_name: Annotated[str | None, Field(title="Triggering User Name")] = None conf: Annotated[dict[str, Any] | None, Field(title="Conf")] = None From 6494744d5ebf2c8bae3bc7f23e5f626c45db65a2 Mon Sep 17 00:00:00 2001 From: Divya Guduru Date: Sat, 20 Jun 2026 21:34:45 +0530 Subject: [PATCH 9/9] add changes --- airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx | 3 +++ .../src/airflow/ui/src/pages/DagRuns/DagRunsFilters.tsx | 1 + 2 files changed, 4 insertions(+) diff --git a/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx b/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx index 3e598189a87ce..fa886d5e02264 100644 --- a/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx +++ b/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx @@ -80,6 +80,7 @@ const { START_DATE_LTE: START_DATE_LTE_PARAM, STATE: STATE_PARAM, TRIGGERING_USER_NAME_PATTERN: TRIGGERING_USER_NAME_PATTERN_PARAM, + TAGS: TAGS, }: SearchParamsKeysType = SearchParamsKeys; type ColumnProps = { @@ -253,6 +254,7 @@ export const DagRuns = () => { const durationLte = searchParams.get(DURATION_LTE_PARAM); const confContains = searchParams.get(CONF_CONTAINS_PARAM); const partitionKeyPattern = searchParams.get(PARTITION_KEY_PATTERN_PARAM); + const filteredTags = searchParams.get(TAGS); const refetchInterval = useAutoRefresh({}); @@ -284,6 +286,7 @@ export const DagRuns = () => { const { data, error, isLoading } = useDagRunServiceGetDagRuns( { bundleVersion: bundleVersion ?? undefined, + tags: filteredTags ?? undefined, confContains: confContains !== null && confContains !== "" ? confContains : undefined, consumingAssetPattern: filteredConsumingAsset ?? undefined, cursor: cursor ?? "", diff --git a/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRunsFilters.tsx b/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRunsFilters.tsx index f39e66cab41ba..ae6a0efc558c2 100644 --- a/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRunsFilters.tsx +++ b/airflow-core/src/airflow/ui/src/pages/DagRuns/DagRunsFilters.tsx @@ -43,6 +43,7 @@ export const DagRunsFilters = ({ dagId }: DagRunsFiltersProps) => { SearchParamsKeys.PARTITION_KEY_PATTERN, SearchParamsKeys.BUNDLE_VERSION, SearchParamsKeys.CONSUMING_ASSET_PATTERN, + SearchParamsKeys.TAGS, ]; if (dagId === undefined) {