This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new e75d8832c7e UI: Filter task instances by rendered map index (#66008)
(#67163)
e75d8832c7e is described below
commit e75d8832c7ecf4233b5e2b9791223be48f0da62f
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Tue May 19 13:28:35 2026 +0200
UI: Filter task instances by rendered map index (#66008) (#67163)
* UI: Search task instances by rendered map index
Adds 'rendered_map_index_pattern' (substring match) and
'rendered_map_index_prefix_pattern' (index-friendly prefix match) query
parameters to the public listMapped and listTaskInstances endpoints, mirroring
the existing 'operator_name', 'pool_name', etc. pattern/prefix-pattern pairs.
The UI surfaces this as a search input in the TaskInstances filter bar — prefix
search by default, with an 'advanced search' toggle to switch to substring
match.
The TaskInstance.rendered_map_index hybrid_property now has a SQL-level
.expression so queries see the same value as the API response: the explicit
_rendered_map_index when set, otherwise str(map_index). Without this, filtering
on rendered map index silently dropped rows whose _rendered_map_index column is
NULL but whose displayed value is the numeric map index.
Closes #51820.
* Fix rebase linting
* Fix mysql tests
* Fix conflicts
---------
(cherry picked from commit 73a6641631d9abc5e030dbd2cb95e9d1879ebd22)
Co-authored-by: Brent Bovenzi <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
---
.../src/airflow/api_fastapi/common/parameters.py | 72 ++++++++++++-
.../core_api/openapi/v2-rest-api-generated.yaml | 90 ++++++++++++++++
.../core_api/routes/public/task_instances.py | 10 ++
.../execution_api/routes/task_instances.py | 4 +-
airflow-core/src/airflow/models/taskinstance.py | 9 ++
.../src/airflow/ui/openapi-gen/queries/common.ts | 12 ++-
.../ui/openapi-gen/queries/ensureQueryData.ts | 20 +++-
.../src/airflow/ui/openapi-gen/queries/prefetch.ts | 20 +++-
.../src/airflow/ui/openapi-gen/queries/queries.ts | 20 +++-
.../src/airflow/ui/openapi-gen/queries/suspense.ts | 20 +++-
.../ui/openapi-gen/requests/services.gen.ts | 12 +++
.../airflow/ui/openapi-gen/requests/types.gen.ts | 20 ++++
.../airflow/ui/public/i18n/locales/en/common.json | 1 +
.../src/airflow/ui/src/constants/filterConfigs.tsx | 7 ++
.../src/airflow/ui/src/constants/searchParams.ts | 1 +
.../ui/src/pages/TaskInstances/TaskInstances.tsx | 9 ++
.../pages/TaskInstances/TaskInstancesFilter.tsx | 2 +
.../src/airflow/ui/src/utils/useFiltersHandler.ts | 1 +
.../core_api/routes/public/test_task_instances.py | 120 +++++++++++++++++----
.../tests/unit/models/test_mappedoperator.py | 4 +-
20 files changed, 407 insertions(+), 47 deletions(-)
diff --git a/airflow-core/src/airflow/api_fastapi/common/parameters.py
b/airflow-core/src/airflow/api_fastapi/common/parameters.py
index 38134d825e7..2688c0090a5 100644
--- a/airflow-core/src/airflow/api_fastapi/common/parameters.py
+++ b/airflow-core/src/airflow/api_fastapi/common/parameters.py
@@ -35,8 +35,10 @@ from typing import (
from fastapi import Depends, HTTPException, Query, status
from pendulum.parsing.exceptions import ParserError
from pydantic import AfterValidator, BaseModel, NonNegativeInt
-from sqlalchemy import Column, and_, func, not_, or_, select as sql_select,
true as sql_true
+from sqlalchemy import Column, String, and_, func, not_, or_, select as
sql_select, true as sql_true
+from sqlalchemy.ext.compiler import compiles
from sqlalchemy.inspection import inspect
+from sqlalchemy.sql.functions import FunctionElement
from airflow._shared.timezones import timezone
from airflow.api_fastapi.compat import HTTP_422_UNPROCESSABLE_CONTENT
@@ -72,12 +74,51 @@ from airflow.utils.types import DagRunType
if TYPE_CHECKING:
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.sql import ColumnElement, Select
+ from sqlalchemy.sql.compiler import SQLCompiler
from airflow.serialization.definitions.dag import SerializedDAG
T = TypeVar("T")
+class _MySQLCollate(FunctionElement):
+ """
+ Wraps a SQL expression so that on MySQL it is emitted with an explicit
``COLLATE`` clause.
+
+ On every other dialect the expression is passed through unchanged.
+
+ This is needed when a computed expression (e.g. a ``CASE … END`` that mixes
+ a stored ``VARCHAR`` column with a ``CAST(integer AS CHAR)``) ends up with
+ MySQL coercibility ``NONE`` because the two branches carry different
implicit
+ collations. Comparing such an expression with a bound parameter fails with
+ "Illegal mix of collations". Wrapping the expression in an explicit
+ ``COLLATE`` gives it ``EXPLICIT`` coercibility, which MySQL accepts in all
+ comparison operators.
+ """
+
+ type = String()
+ inherit_cache = True
+
+ def __init__(self, expr: ColumnElement[Any], collation: str) -> None:
+ super().__init__(expr)
+ self.collation = collation
+
+
+@compiles(_MySQLCollate)
+def _compile_mysql_collate_default(element: _MySQLCollate, compiler:
SQLCompiler, **kw: Any) -> str:
+ """Non-MySQL: render the inner expression without any COLLATE clause."""
+ (expr,) = element.clauses
+ return compiler.process(expr, **kw)
+
+
+@compiles(_MySQLCollate, "mysql")
+def _compile_mysql_collate_mysql(element: _MySQLCollate, compiler:
SQLCompiler, **kw: Any) -> str:
+ """MySQL: wrap the inner expression with the requested COLLATE clause."""
+ (expr,) = element.clauses
+ inner = compiler.process(expr, **kw)
+ return f"({inner}) COLLATE {element.collation}"
+
+
class BaseParam(OrmClause[T], ABC):
"""Base class for path or query parameters with ORM transformation."""
@@ -1392,6 +1433,35 @@ QueryTIMapIndexFilter = Annotated[
)
),
]
+# On MySQL the CASE expression that backs rendered_map_index mixes a stored
+# VARCHAR column (utf8mb4_bin, IMPLICIT) with CAST(map_index AS CHAR)
+# (utf8mb4_0900_ai_ci, IMPLICIT), which gives the whole expression NONE
+# coercibility. Comparing it against a bound parameter then fails with
+# "Illegal mix of collations". _MySQLCollate wraps the expression so that
+# on MySQL an explicit COLLATE clause is emitted (giving EXPLICIT
coercibility);
+# on PostgreSQL and SQLite the wrapper is transparent.
+_rendered_map_index_collated = _MySQLCollate(
+ cast("ColumnElement[Any]", TaskInstance.rendered_map_index),
"utf8mb4_0900_ai_ci"
+)
+
+QueryTIRenderedMapIndexPatternSearch = Annotated[
+ _SearchParam,
+ Depends(
+ search_param_factory(
+ _rendered_map_index_collated,
+ "rendered_map_index_pattern",
+ )
+ ),
+]
+QueryTIRenderedMapIndexPrefixPatternSearch = Annotated[
+ _PrefixSearchParam,
+ Depends(
+ prefix_search_param_factory(
+ _rendered_map_index_collated,
+ "rendered_map_index_prefix_pattern",
+ )
+ ),
+]
# XCom
QueryXComKeyPatternSearch = Annotated[
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 9d8b59ecaea..ede1d9a9545 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
@@ -6892,6 +6892,51 @@ paths:
items:
type: integer
title: Map Index
+ - name: rendered_map_index_pattern
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: "SQL LIKE expression \u2014 use `%` / `_` wildcards
(e.g. `%customer_%`).\
+ \ or the pipe `|` operator for OR logic (e.g. `dag1 | dag2`).
Regular\
+ \ expressions are **not** supported. \n\n**Performance note:**
this full-match\
+ \ pattern is evaluated as ``ILIKE '%term%'`` and most of the time
prevents\
+ \ the database from using B-tree indexes, which can be very slow
on large\
+ \ tables. Prefer the equivalent
``rendered_map_index_prefix_pattern``\
+ \ parameter when possible."
+ title: Rendered Map Index Pattern
+ description: "SQL LIKE expression \u2014 use `%` / `_` wildcards (e.g.
`%customer_%`).\
+ \ or the pipe `|` operator for OR logic (e.g. `dag1 | dag2`).
Regular expressions\
+ \ are **not** supported. \n\n**Performance note:** this full-match
pattern\
+ \ is evaluated as ``ILIKE '%term%'`` and most of the time prevents
the database\
+ \ from using B-tree indexes, which can be very slow on large tables.
Prefer\
+ \ the equivalent ``rendered_map_index_prefix_pattern`` parameter
when possible."
+ - name: rendered_map_index_prefix_pattern
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: "Prefix match \u2014 returns items whose value starts
with\
+ \ the given string (case-sensitive, index-friendly). Use the pipe
`|`\
+ \ operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard\
+ \ characters (`%`, `_`) are treated as literal characters.
Trailing non-alphanumeric\
+ \ characters in the prefix are stripped before matching so the
range scan\
+ \ stays index-compatible under locale-aware collations \u2014 e.g.
`test_`\
+ \ effectively matches items starting with `test`, and `s3://`
matches\
+ \ items starting with `s3`."
+ title: Rendered Map Index Prefix Pattern
+ description: "Prefix match \u2014 returns items whose value starts
with the\
+ \ given string (case-sensitive, index-friendly). Use the pipe `|`
operator\
+ \ for OR logic (e.g. `dag1|dag2`). Use `~` to match all. Wildcard
characters\
+ \ (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric\
+ \ characters in the prefix are stripped before matching so the range
scan\
+ \ stays index-compatible under locale-aware collations \u2014 e.g.
`test_`\
+ \ effectively matches items starting with `test`, and `s3://`
matches items\
+ \ starting with `s3`."
- name: limit
in: query
required: false
@@ -8009,6 +8054,51 @@ paths:
items:
type: integer
title: Map Index
+ - name: rendered_map_index_pattern
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: "SQL LIKE expression \u2014 use `%` / `_` wildcards
(e.g. `%customer_%`).\
+ \ or the pipe `|` operator for OR logic (e.g. `dag1 | dag2`).
Regular\
+ \ expressions are **not** supported. \n\n**Performance note:**
this full-match\
+ \ pattern is evaluated as ``ILIKE '%term%'`` and most of the time
prevents\
+ \ the database from using B-tree indexes, which can be very slow
on large\
+ \ tables. Prefer the equivalent
``rendered_map_index_prefix_pattern``\
+ \ parameter when possible."
+ title: Rendered Map Index Pattern
+ description: "SQL LIKE expression \u2014 use `%` / `_` wildcards (e.g.
`%customer_%`).\
+ \ or the pipe `|` operator for OR logic (e.g. `dag1 | dag2`).
Regular expressions\
+ \ are **not** supported. \n\n**Performance note:** this full-match
pattern\
+ \ is evaluated as ``ILIKE '%term%'`` and most of the time prevents
the database\
+ \ from using B-tree indexes, which can be very slow on large tables.
Prefer\
+ \ the equivalent ``rendered_map_index_prefix_pattern`` parameter
when possible."
+ - name: rendered_map_index_prefix_pattern
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: "Prefix match \u2014 returns items whose value starts
with\
+ \ the given string (case-sensitive, index-friendly). Use the pipe
`|`\
+ \ operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard\
+ \ characters (`%`, `_`) are treated as literal characters.
Trailing non-alphanumeric\
+ \ characters in the prefix are stripped before matching so the
range scan\
+ \ stays index-compatible under locale-aware collations \u2014 e.g.
`test_`\
+ \ effectively matches items starting with `test`, and `s3://`
matches\
+ \ items starting with `s3`."
+ title: Rendered Map Index Prefix Pattern
+ description: "Prefix match \u2014 returns items whose value starts
with the\
+ \ given string (case-sensitive, index-friendly). Use the pipe `|`
operator\
+ \ for OR logic (e.g. `dag1|dag2`). Use `~` to match all. Wildcard
characters\
+ \ (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric\
+ \ characters in the prefix are stripped before matching so the range
scan\
+ \ stays index-compatible under locale-aware collations \u2014 e.g.
`test_`\
+ \ effectively matches items starting with `test`, and `s3://`
matches items\
+ \ starting with `s3`."
- name: limit
in: query
required: false
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
index fe4012662db..2432d8f283a 100644
---
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
+++
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
@@ -59,6 +59,8 @@ from airflow.api_fastapi.common.parameters import (
QueryTIQueueFilter,
QueryTIQueueNamePatternSearch,
QueryTIQueueNamePrefixPatternSearch,
+ QueryTIRenderedMapIndexPatternSearch,
+ QueryTIRenderedMapIndexPrefixPatternSearch,
QueryTIStateFilter,
QueryTITaskDisplayNamePatternSearch,
QueryTITaskDisplayNamePrefixPatternSearch,
@@ -179,6 +181,8 @@ def get_mapped_task_instances(
operator_name_pattern: QueryTIOperatorNamePatternSearch,
operator_name_prefix_pattern: QueryTIOperatorNamePrefixPatternSearch,
map_index: QueryTIMapIndexFilter,
+ rendered_map_index_pattern: QueryTIRenderedMapIndexPatternSearch,
+ rendered_map_index_prefix_pattern:
QueryTIRenderedMapIndexPrefixPatternSearch,
limit: QueryLimit,
offset: QueryOffset,
order_by: Annotated[
@@ -255,6 +259,8 @@ def get_mapped_task_instances(
operator_name_pattern,
operator_name_prefix_pattern,
map_index,
+ rendered_map_index_pattern,
+ rendered_map_index_prefix_pattern,
],
order_by=order_by,
offset=offset,
@@ -467,6 +473,8 @@ def get_task_instances(
operator_name_pattern: QueryTIOperatorNamePatternSearch,
operator_name_prefix_pattern: QueryTIOperatorNamePrefixPatternSearch,
map_index: QueryTIMapIndexFilter,
+ rendered_map_index_pattern: QueryTIRenderedMapIndexPatternSearch,
+ rendered_map_index_prefix_pattern:
QueryTIRenderedMapIndexPrefixPatternSearch,
limit: QueryLimit,
offset: QueryOffset,
order_by: Annotated[
@@ -574,6 +582,8 @@ def get_task_instances(
operator_name_pattern,
operator_name_prefix_pattern,
map_index,
+ rendered_map_index_pattern,
+ rendered_map_index_prefix_pattern,
]
if use_cursor:
diff --git
a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
index d4a1309093a..15feb13ac3d 100644
---
a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
+++
b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
@@ -399,6 +399,8 @@ def ti_update_state(
# We exclude_unset to avoid updating fields that are not set in the payload
data = ti_patch_payload.model_dump(exclude={"task_outlets",
"outlet_events"}, exclude_unset=True)
+ if "rendered_map_index" in data:
+ data["_rendered_map_index"] = data.pop("rendered_map_index")
query = update(TI).where(TI.id == task_instance_id).values(data)
try:
@@ -862,7 +864,7 @@ def ti_patch_rendered_map_index(
log.debug("Updating rendered_map_index", length=len(rendered_map_index))
- query = update(TI).where(TI.id ==
task_instance_id).values(rendered_map_index=rendered_map_index)
+ query = update(TI).where(TI.id ==
task_instance_id).values(_rendered_map_index=rendered_map_index)
result = session.execute(query)
result = cast("CursorResult[Any]", result)
diff --git a/airflow-core/src/airflow/models/taskinstance.py
b/airflow-core/src/airflow/models/taskinstance.py
index 3e2cf88beaf..026979ee342 100644
--- a/airflow-core/src/airflow/models/taskinstance.py
+++ b/airflow-core/src/airflow/models/taskinstance.py
@@ -48,6 +48,7 @@ from sqlalchemy import (
Uuid,
and_,
case,
+ cast,
delete,
extract,
false,
@@ -776,6 +777,14 @@ class TaskInstance(Base, LoggingMixin, BaseWorkload):
return str(self.map_index)
return None
+ @rendered_map_index.expression # type: ignore[no-redef]
+ def rendered_map_index(cls):
+ return case(
+ (cls._rendered_map_index.isnot(None), cls._rendered_map_index),
+ (cls.map_index >= 0, cast(cls.map_index, String)),
+ else_=None,
+ )
+
@property
def log_url(self) -> str:
"""Log URL for TaskInstance."""
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 53fc9e4d2bb..f12b54a397d 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/queries/common.ts
@@ -409,7 +409,7 @@ export const UseTaskInstanceServiceGetTaskInstanceKeyFn =
({ dagId, dagRunId, ta
export type TaskInstanceServiceGetMappedTaskInstancesDefaultResponse =
Awaited<ReturnType<typeof TaskInstanceService.getMappedTaskInstances>>;
export type TaskInstanceServiceGetMappedTaskInstancesQueryResult<TData =
TaskInstanceServiceGetMappedTaskInstancesDefaultResponse, TError = unknown> =
UseQueryResult<TData, TError>;
export const useTaskInstanceServiceGetMappedTaskInstancesKey =
"TaskInstanceServiceGetMappedTaskInstances";
-export const UseTaskInstanceServiceGetMappedTaskInstancesKeyFn = ({ dagId,
dagRunId, durationGt, durationGte, durationLt, durationLte, endDateGt,
endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
runAfterGt, runAfterGte, runAfterLt, runAfterLte, st [...]
+export const UseTaskInstanceServiceGetMappedTaskInstancesKeyFn = ({ dagId,
dagRunId, durationGt, durationGte, durationLt, durationLte, endDateGt,
endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
renderedMapIndexPattern, renderedMapIndexPrefixPatte [...]
dagId: string;
dagRunId: string;
durationGt?: number;
@@ -438,6 +438,8 @@ export const
UseTaskInstanceServiceGetMappedTaskInstancesKeyFn = ({ dagId, dagRu
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -454,7 +456,7 @@ export const
UseTaskInstanceServiceGetMappedTaskInstancesKeyFn = ({ dagId, dagRu
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: Array<unknown>) =>
[useTaskInstanceServiceGetMappedTaskInstancesKey, ...(queryKey ?? [{ dagId,
dagRunId, durationGt, durationGte, durationLt, durationLte, endDateGt,
endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
runAfterGt, runAft [...]
+}, queryKey?: Array<unknown>) =>
[useTaskInstanceServiceGetMappedTaskInstancesKey, ...(queryKey ?? [{ dagId,
dagRunId, durationGt, durationGte, durationLt, durationLte, endDateGt,
endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
renderedMapIndexPa [...]
export type
TaskInstanceServiceGetTaskInstanceDependenciesByMapIndexDefaultResponse =
Awaited<ReturnType<typeof
TaskInstanceService.getTaskInstanceDependenciesByMapIndex>>;
export type
TaskInstanceServiceGetTaskInstanceDependenciesByMapIndexQueryResult<TData =
TaskInstanceServiceGetTaskInstanceDependenciesByMapIndexDefaultResponse, TError
= unknown> = UseQueryResult<TData, TError>;
export const useTaskInstanceServiceGetTaskInstanceDependenciesByMapIndexKey =
"TaskInstanceServiceGetTaskInstanceDependenciesByMapIndex";
@@ -503,7 +505,7 @@ export const
UseTaskInstanceServiceGetMappedTaskInstanceKeyFn = ({ dagId, dagRun
export type TaskInstanceServiceGetTaskInstancesDefaultResponse =
Awaited<ReturnType<typeof TaskInstanceService.getTaskInstances>>;
export type TaskInstanceServiceGetTaskInstancesQueryResult<TData =
TaskInstanceServiceGetTaskInstancesDefaultResponse, TError = unknown> =
UseQueryResult<TData, TError>;
export const useTaskInstanceServiceGetTaskInstancesKey =
"TaskInstanceServiceGetTaskInstances";
-export const UseTaskInstanceServiceGetTaskInstancesKeyFn = ({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, runAfterGt, runA [...]
+export const UseTaskInstanceServiceGetTaskInstancesKeyFn = ({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, renderedMapIndex [...]
cursor?: string;
dagId: string;
dagIdPattern?: string;
@@ -535,6 +537,8 @@ export const UseTaskInstanceServiceGetTaskInstancesKeyFn =
({ cursor, dagId, dag
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -556,7 +560,7 @@ export const UseTaskInstanceServiceGetTaskInstancesKeyFn =
({ cursor, dagId, dag
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: Array<unknown>) => [useTaskInstanceServiceGetTaskInstancesKey,
...(queryKey ?? [{ cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueN [...]
+}, queryKey?: Array<unknown>) => [useTaskInstanceServiceGetTaskInstancesKey,
...(queryKey ?? [{ cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueN [...]
export type TaskInstanceServiceGetTaskInstanceTryDetailsDefaultResponse =
Awaited<ReturnType<typeof TaskInstanceService.getTaskInstanceTryDetails>>;
export type TaskInstanceServiceGetTaskInstanceTryDetailsQueryResult<TData =
TaskInstanceServiceGetTaskInstanceTryDetailsDefaultResponse, TError = unknown>
= UseQueryResult<TData, TError>;
export const useTaskInstanceServiceGetTaskInstanceTryDetailsKey =
"TaskInstanceServiceGetTaskInstanceTryDetails";
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 b5145f1a689..63adabe5d2e 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts
@@ -865,13 +865,17 @@ export const
ensureUseTaskInstanceServiceGetTaskInstanceData = (queryClient: Que
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, run_after, logical_date, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const ensureUseTaskInstanceServiceGetMappedTaskInstancesData =
(queryClient: QueryClient, { dagId, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, runAfterGt, runAfterG [...]
+export const ensureUseTaskInstanceServiceGetMappedTaskInstancesData =
(queryClient: QueryClient, { dagId, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, renderedMapIndexPatte [...]
dagId: string;
dagRunId: string;
durationGt?: number;
@@ -900,6 +904,8 @@ export const
ensureUseTaskInstanceServiceGetMappedTaskInstancesData = (queryClie
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -916,7 +922,7 @@ export const
ensureUseTaskInstanceServiceGetMappedTaskInstancesData = (queryClie
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}) => queryClient.ensureQueryData({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
runAfterGt, run [...]
+}) => queryClient.ensureQueryData({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
renderedMapInde [...]
/**
* Get Task Instance Dependencies
* Get dependencies blocking task from getting scheduled.
@@ -1078,13 +1084,17 @@ export const
ensureUseTaskInstanceServiceGetMappedTaskInstanceData = (queryClien
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, logical_date, run_after, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const ensureUseTaskInstanceServiceGetTaskInstancesData = (queryClient:
QueryClient, { cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueName [...]
+export const ensureUseTaskInstanceServiceGetTaskInstancesData = (queryClient:
QueryClient, { cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueName [...]
cursor?: string;
dagId: string;
dagIdPattern?: string;
@@ -1116,6 +1126,8 @@ export const
ensureUseTaskInstanceServiceGetTaskInstancesData = (queryClient: Qu
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -1137,7 +1149,7 @@ export const
ensureUseTaskInstanceServiceGetTaskInstancesData = (queryClient: Qu
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}) => queryClient.ensureQueryData({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
que [...]
+}) => queryClient.ensureQueryData({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
que [...]
/**
* Get Task Instance Try Details
* Get task instance details by try number.
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 e3b86491719..d30badca166 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts
@@ -865,13 +865,17 @@ export const
prefetchUseTaskInstanceServiceGetTaskInstance = (queryClient: Query
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, run_after, logical_date, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const prefetchUseTaskInstanceServiceGetMappedTaskInstances =
(queryClient: QueryClient, { dagId, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, runAfterGt, runAfterGte [...]
+export const prefetchUseTaskInstanceServiceGetMappedTaskInstances =
(queryClient: QueryClient, { dagId, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queueNamePrefixPattern, renderedMapIndexPattern [...]
dagId: string;
dagRunId: string;
durationGt?: number;
@@ -900,6 +904,8 @@ export const
prefetchUseTaskInstanceServiceGetMappedTaskInstances = (queryClient
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -916,7 +922,7 @@ export const
prefetchUseTaskInstanceServiceGetMappedTaskInstances = (queryClient
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}) => queryClient.prefetchQuery({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
runAfterGt, runAf [...]
+}) => queryClient.prefetchQuery({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePrefixPattern,
renderedMapIndexP [...]
/**
* Get Task Instance Dependencies
* Get dependencies blocking task from getting scheduled.
@@ -1078,13 +1084,17 @@ export const
prefetchUseTaskInstanceServiceGetMappedTaskInstance = (queryClient:
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, logical_date, run_after, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const prefetchUseTaskInstanceServiceGetTaskInstances = (queryClient:
QueryClient, { cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePr [...]
+export const prefetchUseTaskInstanceServiceGetTaskInstances = (queryClient:
QueryClient, { cursor, dagId, dagIdPattern, dagIdPrefixPattern, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePattern,
poolNamePrefixPattern, queue, queueNamePattern, queueNamePr [...]
cursor?: string;
dagId: string;
dagIdPattern?: string;
@@ -1116,6 +1126,8 @@ export const
prefetchUseTaskInstanceServiceGetTaskInstances = (queryClient: Quer
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -1137,7 +1149,7 @@ export const
prefetchUseTaskInstanceServiceGetTaskInstances = (queryClient: Quer
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}) => queryClient.prefetchQuery({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queue [...]
+}) => queryClient.prefetchQuery({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPattern,
orderBy, pool, poolNamePattern, poolNamePrefixPattern, queue, queueNamePattern,
queue [...]
/**
* Get Task Instance Try Details
* Get task instance details by try number.
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 214782599bd..c7292be1882 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts
@@ -865,13 +865,17 @@ export const useTaskInstanceServiceGetTaskInstance =
<TData = Common.TaskInstanc
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, run_after, logical_date, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const useTaskInstanceServiceGetMappedTaskInstances = <TData =
Common.TaskInstanceServiceGetMappedTaskInstancesDefaultResponse, TError =
unknown, TQueryKey extends Array<unknown> = unknown[]>({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNameP [...]
+export const useTaskInstanceServiceGetMappedTaskInstances = <TData =
Common.TaskInstanceServiceGetMappedTaskInstancesDefaultResponse, TError =
unknown, TQueryKey extends Array<unknown> = unknown[]>({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNameP [...]
dagId: string;
dagRunId: string;
durationGt?: number;
@@ -900,6 +904,8 @@ export const useTaskInstanceServiceGetMappedTaskInstances =
<TData = Common.Task
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -916,7 +922,7 @@ export const useTaskInstanceServiceGetMappedTaskInstances =
<TData = Common.Task
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePatter [...]
+}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNamePatter [...]
/**
* Get Task Instance Dependencies
* Get dependencies blocking task from getting scheduled.
@@ -1078,13 +1084,17 @@ export const
useTaskInstanceServiceGetMappedTaskInstance = <TData = Common.TaskI
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, logical_date, run_after, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const useTaskInstanceServiceGetTaskInstances = <TData =
Common.TaskInstanceServiceGetTaskInstancesDefaultResponse, TError = unknown,
TQueryKey extends Array<unknown> = unknown[]>({ cursor, dagId, dagIdPattern,
dagIdPrefixPattern, dagRunId, durationGt, durationGte, durationLt, durationLte,
endDateGt, endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPat [...]
+export const useTaskInstanceServiceGetTaskInstances = <TData =
Common.TaskInstanceServiceGetTaskInstancesDefaultResponse, TError = unknown,
TQueryKey extends Array<unknown> = unknown[]>({ cursor, dagId, dagIdPattern,
dagIdPrefixPattern, dagRunId, durationGt, durationGte, durationLt, durationLte,
endDateGt, endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNamePrefixPat [...]
cursor?: string;
dagId: string;
dagIdPattern?: string;
@@ -1116,6 +1126,8 @@ export const useTaskInstanceServiceGetTaskInstances =
<TData = Common.TaskInstan
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -1137,7 +1149,7 @@ export const useTaskInstanceServiceGetTaskInstances =
<TData = Common.TaskInstan
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPa [...]
+}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorNamePrefixPa [...]
/**
* Get Task Instance Try Details
* Get task instance details by try number.
diff --git a/airflow-core/src/airflow/ui/openapi-gen/queries/suspense.ts
b/airflow-core/src/airflow/ui/openapi-gen/queries/suspense.ts
index a3d55ea6a33..46856ebebf4 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/queries/suspense.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/queries/suspense.ts
@@ -865,13 +865,17 @@ export const
useTaskInstanceServiceGetTaskInstanceSuspense = <TData = Common.Tas
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, run_after, logical_date, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const useTaskInstanceServiceGetMappedTaskInstancesSuspense = <TData =
Common.TaskInstanceServiceGetMappedTaskInstancesDefaultResponse, TError =
unknown, TQueryKey extends Array<unknown> = unknown[]>({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, p [...]
+export const useTaskInstanceServiceGetMappedTaskInstancesSuspense = <TData =
Common.TaskInstanceServiceGetMappedTaskInstancesDefaultResponse, TError =
unknown, TQueryKey extends Array<unknown> = unknown[]>({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, p [...]
dagId: string;
dagRunId: string;
durationGt?: number;
@@ -900,6 +904,8 @@ export const
useTaskInstanceServiceGetMappedTaskInstancesSuspense = <TData = Com
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -916,7 +922,7 @@ export const
useTaskInstanceServiceGetMappedTaskInstancesSuspense = <TData = Com
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useSuspenseQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNa [...]
+}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useSuspenseQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetMappedTaskInstancesKeyFn({ dagId, dagRunId,
durationGt, durationGte, durationLt, durationLte, endDateGt, endDateGte,
endDateLt, endDateLte, executor, limit, logicalDateGt, logicalDateGte,
logicalDateLt, logicalDateLte, mapIndex, offset, operator, operatorNamePattern,
operatorNamePrefixPattern, orderBy, pool, poolNa [...]
/**
* Get Task Instance Dependencies
* Get dependencies blocking task from getting scheduled.
@@ -1078,13 +1084,17 @@ export const
useTaskInstanceServiceGetMappedTaskInstanceSuspense = <TData = Comm
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items starting [...]
* @param data.mapIndex
+* @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+*
+* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+* @param data.renderedMapIndexPrefixPattern Prefix match — returns items whose
value starts with the given string (case-sensitive, index-friendly). Use the
pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items start [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, logical_date, run_after, data_interval_start, data_interval_end`
* @returns TaskInstanceCollectionResponse Successful Response
* @throws ApiError
*/
-export const useTaskInstanceServiceGetTaskInstancesSuspense = <TData =
Common.TaskInstanceServiceGetTaskInstancesDefaultResponse, TError = unknown,
TQueryKey extends Array<unknown> = unknown[]>({ cursor, dagId, dagIdPattern,
dagIdPrefixPattern, dagRunId, durationGt, durationGte, durationLt, durationLte,
endDateGt, endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNameP [...]
+export const useTaskInstanceServiceGetTaskInstancesSuspense = <TData =
Common.TaskInstanceServiceGetTaskInstancesDefaultResponse, TError = unknown,
TQueryKey extends Array<unknown> = unknown[]>({ cursor, dagId, dagIdPattern,
dagIdPrefixPattern, dagRunId, durationGt, durationGte, durationLt, durationLte,
endDateGt, endDateGte, endDateLt, endDateLte, executor, limit, logicalDateGt,
logicalDateGte, logicalDateLt, logicalDateLte, mapIndex, offset, operator,
operatorNamePattern, operatorNameP [...]
cursor?: string;
dagId: string;
dagIdPattern?: string;
@@ -1116,6 +1126,8 @@ export const
useTaskInstanceServiceGetTaskInstancesSuspense = <TData = Common.Ta
queue?: string[];
queueNamePattern?: string;
queueNamePrefixPattern?: string;
+ renderedMapIndexPattern?: string;
+ renderedMapIndexPrefixPattern?: string;
runAfterGt?: string;
runAfterGte?: string;
runAfterLt?: string;
@@ -1137,7 +1149,7 @@ export const
useTaskInstanceServiceGetTaskInstancesSuspense = <TData = Common.Ta
updatedAtLt?: string;
updatedAtLte?: string;
versionNumber?: number[];
-}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useSuspenseQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorName [...]
+}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>,
"queryKey" | "queryFn">) => useSuspenseQuery<TData, TError>({ queryKey:
Common.UseTaskInstanceServiceGetTaskInstancesKeyFn({ cursor, dagId,
dagIdPattern, dagIdPrefixPattern, dagRunId, durationGt, durationGte,
durationLt, durationLte, endDateGt, endDateGte, endDateLt, endDateLte,
executor, limit, logicalDateGt, logicalDateGte, logicalDateLt, logicalDateLte,
mapIndex, offset, operator, operatorNamePattern, operatorName [...]
/**
* Get Task Instance Try Details
* Get task instance details by try number.
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 3fabd5ebf59..673f20a1d98 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
@@ -2163,6 +2163,10 @@ export class TaskInstanceService {
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items
whose value starts with the given string (case-sensitive, index-friendly). Use
the pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items star [...]
* @param data.mapIndex
+ * @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+ *
+ * **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+ * @param data.renderedMapIndexPrefixPattern Prefix match — returns items
whose value starts with the given string (case-sensitive, index-friendly). Use
the pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, run_after, logical_date, data_interval_start, data_interval_end`
@@ -2217,6 +2221,8 @@ export class TaskInstanceService {
operator_name_pattern: data.operatorNamePattern,
operator_name_prefix_pattern: data.operatorNamePrefixPattern,
map_index: data.mapIndex,
+ rendered_map_index_pattern: data.renderedMapIndexPattern,
+ rendered_map_index_prefix_pattern:
data.renderedMapIndexPrefixPattern,
limit: data.limit,
offset: data.offset,
order_by: data.orderBy
@@ -2499,6 +2505,10 @@ export class TaskInstanceService {
* **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``operator_name_prefix_pattern`` parameter when possible.
* @param data.operatorNamePrefixPattern Prefix match — returns items
whose value starts with the given string (case-sensitive, index-friendly). Use
the pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items star [...]
* @param data.mapIndex
+ * @param data.renderedMapIndexPattern SQL LIKE expression — use `%` / `_`
wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR logic (e.g.
`dag1 | dag2`). Regular expressions are **not** supported.
+ *
+ * **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+ * @param data.renderedMapIndexPrefixPattern Prefix match — returns items
whose value starts with the given string (case-sensitive, index-friendly). Use
the pipe `|` operator for OR logic (e.g. `dag1|dag2`). Use `~` to match all.
Wildcard characters (`%`, `_`) are treated as literal characters. Trailing
non-alphanumeric characters in the prefix are stripped before matching so the
range scan stays index-compatible under locale-aware collations — e.g. `test_`
effectively matches items [...]
* @param data.limit
* @param data.offset
* @param data.orderBy Attributes to order by, multi criteria sort is
supported. Prefix with `-` for descending order. Supported attributes: `id,
state, duration, start_date, end_date, map_index, try_number, logical_date,
run_after, data_interval_start, data_interval_end, rendered_map_index,
operator, logical_date, run_after, data_interval_start, data_interval_end`
@@ -2561,6 +2571,8 @@ export class TaskInstanceService {
operator_name_pattern: data.operatorNamePattern,
operator_name_prefix_pattern: data.operatorNamePrefixPattern,
map_index: data.mapIndex,
+ rendered_map_index_pattern: data.renderedMapIndexPattern,
+ rendered_map_index_prefix_pattern:
data.renderedMapIndexPrefixPattern,
limit: data.limit,
offset: data.offset,
order_by: data.orderBy
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 cca921b6bef..1a4e4a65ea4 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
@@ -3188,6 +3188,16 @@ export type GetMappedTaskInstancesData = {
* Prefix match — returns items whose value starts with the given string
(case-sensitive, index-friendly). Use the pipe `|` operator for OR logic (e.g.
`dag1|dag2`). Use `~` to match all. Wildcard characters (`%`, `_`) are treated
as literal characters. Trailing non-alphanumeric characters in the prefix are
stripped before matching so the range scan stays index-compatible under
locale-aware collations — e.g. `test_` effectively matches items starting with
`test`, and `s3://` matches [...]
*/
queueNamePrefixPattern?: string | null;
+ /**
+ * SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). or
the pipe `|` operator for OR logic (e.g. `dag1 | dag2`). Regular expressions
are **not** supported.
+ *
+ * **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+ */
+ renderedMapIndexPattern?: string | null;
+ /**
+ * Prefix match — returns items whose value starts with the given string
(case-sensitive, index-friendly). Use the pipe `|` operator for OR logic (e.g.
`dag1|dag2`). Use `~` to match all. Wildcard characters (`%`, `_`) are treated
as literal characters. Trailing non-alphanumeric characters in the prefix are
stripped before matching so the range scan stays index-compatible under
locale-aware collations — e.g. `test_` effectively matches items starting with
`test`, and `s3://` matches [...]
+ */
+ renderedMapIndexPrefixPattern?: string | null;
runAfterGt?: string | null;
runAfterGte?: string | null;
runAfterLt?: string | null;
@@ -3334,6 +3344,16 @@ export type GetTaskInstancesData = {
* Prefix match — returns items whose value starts with the given string
(case-sensitive, index-friendly). Use the pipe `|` operator for OR logic (e.g.
`dag1|dag2`). Use `~` to match all. Wildcard characters (`%`, `_`) are treated
as literal characters. Trailing non-alphanumeric characters in the prefix are
stripped before matching so the range scan stays index-compatible under
locale-aware collations — e.g. `test_` effectively matches items starting with
`test`, and `s3://` matches [...]
*/
queueNamePrefixPattern?: string | null;
+ /**
+ * SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). or
the pipe `|` operator for OR logic (e.g. `dag1 | dag2`). Regular expressions
are **not** supported.
+ *
+ * **Performance note:** this full-match pattern is evaluated as ``ILIKE
'%term%'`` and most of the time prevents the database from using B-tree
indexes, which can be very slow on large tables. Prefer the equivalent
``rendered_map_index_prefix_pattern`` parameter when possible.
+ */
+ renderedMapIndexPattern?: string | null;
+ /**
+ * Prefix match — returns items whose value starts with the given string
(case-sensitive, index-friendly). Use the pipe `|` operator for OR logic (e.g.
`dag1|dag2`). Use `~` to match all. Wildcard characters (`%`, `_`) are treated
as literal characters. Trailing non-alphanumeric characters in the prefix are
stripped before matching so the range scan stays index-compatible under
locale-aware collations — e.g. `test_` effectively matches items starting with
`test`, and `s3://` matches [...]
+ */
+ renderedMapIndexPrefixPattern?: string | null;
runAfterGt?: string | null;
runAfterGte?: string | null;
runAfterLt?: string | null;
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 f450ecaf64d..3a220d7b313 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
@@ -275,6 +275,7 @@
"priorityWeight": "Priority Weight",
"queue": "Queue",
"queuedWhen": "Queued At",
+ "renderedMapIndex": "Rendered Map Index",
"scheduledWhen": "Scheduled At",
"triggerer": {
"assigned": "Assigned triggerer",
diff --git a/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx
b/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx
index 64a80f92ec3..02fb725239e 100644
--- a/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx
+++ b/airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx
@@ -246,6 +246,13 @@ export const useFilterConfigs = () => {
supportsAdvancedSearch: true,
type: FilterTypes.TEXT,
},
+ [SearchParamsKeys.RENDERED_MAP_INDEX]: {
+ hotkeyDisabled: true,
+ icon: <MdSearch />,
+ label: translate("common:taskInstance.renderedMapIndex"),
+ supportsAdvancedSearch: true,
+ type: FilterTypes.TEXT,
+ },
[SearchParamsKeys.RESPONDED_BY_USER_NAME]: {
hotkeyDisabled: true,
icon: <FiUser />,
diff --git a/airflow-core/src/airflow/ui/src/constants/searchParams.ts
b/airflow-core/src/airflow/ui/src/constants/searchParams.ts
index 627227a04c1..3720fa0b65a 100644
--- a/airflow-core/src/airflow/ui/src/constants/searchParams.ts
+++ b/airflow-core/src/airflow/ui/src/constants/searchParams.ts
@@ -68,6 +68,7 @@ export enum SearchParamsKeys {
POOL = "pool",
POOL_NAME_PATTERN = "pool_name_pattern",
QUEUE_NAME_PATTERN = "queue_name_pattern",
+ RENDERED_MAP_INDEX = "rendered_map_index",
RESPONDED_BY_USER_NAME = "responded_by_user_name",
RESPONSE_RECEIVED = "response_received",
RETRIES = "retries",
diff --git
a/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx
b/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx
index ee1983a68bd..3528f92326f 100644
--- a/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx
@@ -58,6 +58,7 @@ const {
OPERATOR_NAME_PATTERN: OPERATOR_NAME_PATTERN_PARAM,
POOL_NAME_PATTERN: POOL_NAME_PATTERN_PARAM,
QUEUE_NAME_PATTERN: QUEUE_NAME_PATTERN_PARAM,
+ RENDERED_MAP_INDEX: RENDERED_MAP_INDEX_PARAM,
RUN_ID_PATTERN: RUN_ID_PATTERN_PARAM,
START_DATE: START_DATE_PARAM,
TASK_STATE: STATE_PARAM,
@@ -252,6 +253,7 @@ export const TaskInstances = () => {
const poolNamePattern = searchParams.get(POOL_NAME_PATTERN_PARAM);
const queueNamePattern = searchParams.get(QUEUE_NAME_PATTERN_PARAM);
const operatorNamePattern = searchParams.get(OPERATOR_NAME_PATTERN_PARAM);
+ const renderedMapIndexFilter = searchParams.get(RENDERED_MAP_INDEX_PARAM);
const filteredDagIdPattern = searchParams.get(DAG_ID_PATTERN_PARAM);
const filteredRunId = searchParams.get(RUN_ID_PATTERN_PARAM);
const hasFilteredState = filteredState.length > 0;
@@ -295,6 +297,12 @@ export const TaskInstances = () => {
storageKey: QUEUE_NAME_PATTERN_PARAM,
value: queueNamePattern,
});
+ const renderedMapIndexArg = useAdvancedSearchArg({
+ patternApiKey: "renderedMapIndexPattern",
+ prefixApiKey: "renderedMapIndexPrefixPattern",
+ storageKey: RENDERED_MAP_INDEX_PARAM,
+ value: renderedMapIndexFilter,
+ });
const { data, error, isLoading } = useTaskInstanceServiceGetTaskInstances(
{
@@ -313,6 +321,7 @@ export const TaskInstances = () => {
orderBy,
...poolNameArg,
...queueNameArg,
+ ...renderedMapIndexArg,
...runIdPatternArg,
startDateGte: startDate ?? undefined,
state: hasFilteredState ? filteredState : undefined,
diff --git
a/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstancesFilter.tsx
b/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstancesFilter.tsx
index ce7218652b9..40b6c1c36fe 100644
---
a/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstancesFilter.tsx
+++
b/airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstancesFilter.tsx
@@ -35,6 +35,7 @@ const {
OPERATOR_NAME_PATTERN: OPERATOR_NAME_PATTERN_PARAM,
POOL_NAME_PATTERN: POOL_NAME_PATTERN_PARAM,
QUEUE_NAME_PATTERN: QUEUE_NAME_PATTERN_PARAM,
+ RENDERED_MAP_INDEX: RENDERED_MAP_INDEX_PARAM,
RUN_ID_PATTERN: RUN_ID_PATTERN_PARAM,
TASK_STATE: STATE_PARAM,
TRY_NUMBER: TRY_NUMBER_PARAM,
@@ -50,6 +51,7 @@ export const TaskInstancesFilter = () => {
DURATION_LTE_PARAM as FilterableSearchParamsKeys,
TRY_NUMBER_PARAM as FilterableSearchParamsKeys,
MAP_INDEX_PARAM as FilterableSearchParamsKeys,
+ RENDERED_MAP_INDEX_PARAM as FilterableSearchParamsKeys,
DAG_VERSION_PARAM as FilterableSearchParamsKeys,
OPERATOR_NAME_PATTERN_PARAM as FilterableSearchParamsKeys,
POOL_NAME_PATTERN_PARAM as FilterableSearchParamsKeys,
diff --git a/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts
b/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts
index f5dd2b0101a..c97e75155ef 100644
--- a/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts
+++ b/airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts
@@ -83,6 +83,7 @@ export type FilterableSearchParamsKeys =
| SearchParamsKeys.PARTITION_KEY_PATTERN
| SearchParamsKeys.POOL_NAME_PATTERN
| SearchParamsKeys.QUEUE_NAME_PATTERN
+ | SearchParamsKeys.RENDERED_MAP_INDEX
| SearchParamsKeys.RESPONDED_BY_USER_NAME
| SearchParamsKeys.RESPONSE_RECEIVED
| SearchParamsKeys.RUN_AFTER_RANGE
diff --git
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.py
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.py
index 31f92e3c840..4738d2b0a96 100644
---
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.py
+++
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.py
@@ -52,7 +52,6 @@ from airflow.utils.types import DagRunType
from tests_common.test_utils.api_fastapi import _check_task_instance_note
from tests_common.test_utils.asserts import assert_queries_count
-from tests_common.test_utils.config import conf_vars
from tests_common.test_utils.db import (
clear_db_runs,
clear_db_teams,
@@ -852,6 +851,11 @@ class TestGetMappedTaskInstances:
({"order_by": "-logical_date", "limit": 100}, list(range(109, 9,
-1))),
({"order_by": "data_interval_start", "limit": 100},
list(range(100))),
({"order_by": "-data_interval_start", "limit": 100},
list(range(109, 9, -1))),
+ ({"order_by": "rendered_map_index", "limit": 100},
sorted(range(110), key=str)[:100]),
+ (
+ {"order_by": "-rendered_map_index", "limit": 100},
+ sorted(range(110), key=str, reverse=True)[:100],
+ ),
],
)
def test_mapped_instances_order(
@@ -871,37 +875,55 @@ class TestGetMappedTaskInstances:
assert len(body["task_instances"]) == min(params["limit"],
conf.getint("api", "maximum_page_limit"))
assert expected_map_indexes == [ti["map_index"] for ti in
body["task_instances"]]
- # Ordering of nulls values is DB specific.
- @pytest.mark.backend("sqlite")
@pytest.mark.parametrize(
- ("params", "expected_map_indexes"),
+ ("filter_param", "value", "expected_map_indexes"),
[
- ({"order_by": "rendered_map_index", "limit": 108}, list(range(1,
109))), # Asc
- ({"order_by": "-rendered_map_index", "limit": 100}, [0] +
list(range(11, 110)[::-1])), # Desc
+ # Prefix match (index-friendly).
+ ("rendered_map_index_prefix_pattern", "table_", [0, 1]),
+ ("rendered_map_index_prefix_pattern", "metrics", [2, 3]),
+ ("rendered_map_index_prefix_pattern", "nope", []),
+ # Fallback to str(map_index) when _rendered_map_index is NULL.
+ # Prefix "10" matches "10" and "100".."109".
+ ("rendered_map_index_prefix_pattern", "10", [10, *range(100,
110)]),
+ # Substring match (advanced).
+ ("rendered_map_index_pattern", "table_orders", [0]),
+ ("rendered_map_index_pattern", "table_orders|metrics_daily", [0,
2]),
+ ("rendered_map_index_pattern", "_users", [1]),
+ ("rendered_map_index_pattern", "nope", []),
],
)
- @conf_vars({("api", "maximum_page_limit"): "110"})
- def test_rendered_map_index_order(
- self, test_client, session, params, expected_map_indexes,
one_task_with_many_mapped_tis
+ def test_rendered_map_index_filter(
+ self,
+ test_client,
+ session,
+ one_task_with_many_mapped_tis,
+ filter_param,
+ value,
+ expected_map_indexes,
):
- ti = session.scalars(
- select(TaskInstance).where(TaskInstance.task_id == "task_2",
TaskInstance.map_index == 0)
- ).first()
-
- ti._rendered_map_index = "a"
-
+ rendered_by_map_index = {
+ 0: "table_orders",
+ 1: "table_users",
+ 2: "metrics_daily",
+ 3: "metrics_hourly",
+ }
+ for map_index, rendered in rendered_by_map_index.items():
+ ti = session.scalars(
+ select(TaskInstance).where(
+ TaskInstance.task_id == "task_2", TaskInstance.map_index
== map_index
+ )
+ ).first()
+ ti._rendered_map_index = rendered
session.commit()
- with assert_queries_count(4):
- response = test_client.get(
-
"/dags/mapped_tis/dagRuns/run_mapped_tis/taskInstances/task_2/listMapped",
- params=params,
- )
+ response = test_client.get(
+
"/dags/mapped_tis/dagRuns/run_mapped_tis/taskInstances/task_2/listMapped",
+ params={filter_param: value, "order_by": "map_index"},
+ )
assert response.status_code == 200
body = response.json()
- assert body["total_entries"] == 110
- assert len(body["task_instances"]) == params["limit"]
- assert expected_map_indexes == [ti["map_index"] for ti in
body["task_instances"]]
+ assert body["total_entries"] == len(expected_map_indexes)
+ assert [ti["map_index"] for ti in body["task_instances"]] ==
expected_map_indexes
def test_with_date(self, test_client, one_task_with_mapped_tis):
response = test_client.get(
@@ -1484,6 +1506,34 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
3,
id="test map_index filter",
),
+ pytest.param(
+ [
+ {"map_index": 0, "_rendered_map_index": "table_orders"},
+ {"map_index": 1, "_rendered_map_index": "table_users"},
+ {"map_index": 2, "_rendered_map_index": None},
+ {"map_index": 3, "_rendered_map_index": None},
+ ],
+ True,
+ "/dags/~/dagRuns/~/taskInstances",
+ {"rendered_map_index_prefix_pattern": "table_"},
+ 2,
+ 3,
+ id="test rendered_map_index_prefix_pattern filter",
+ ),
+ pytest.param(
+ [
+ {"map_index": 0, "_rendered_map_index": "table_orders"},
+ {"map_index": 1, "_rendered_map_index": "table_users"},
+ {"map_index": 2, "_rendered_map_index": None},
+ {"map_index": 3, "_rendered_map_index": None},
+ ],
+ True,
+ "/dags/~/dagRuns/~/taskInstances",
+ {"rendered_map_index_pattern": "_users|table_orders"},
+ 2,
+ 3,
+ id="test rendered_map_index_pattern filter",
+ ),
pytest.param(
[
{},
@@ -1785,6 +1835,30 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
assert len(field_desc) == ti_count
assert field_asc == list(reversed(field_desc))
+ @pytest.mark.parametrize(
+ ("order_by", "expected_map_indexes"),
+ [
+ ("rendered_map_index", [2, 3, 0, 1]),
+ ("-rendered_map_index", [1, 0, 3, 2]),
+ ],
+ )
+ def test_should_respond_200_for_rendered_map_index_order(
+ self, test_client, session, order_by, expected_map_indexes
+ ):
+ self.create_task_instances(
+ session,
+ update_extras=True,
+ task_instances=[
+ {"map_index": 0, "_rendered_map_index": "table_orders"},
+ {"map_index": 1, "_rendered_map_index": "table_users"},
+ {"map_index": 2, "_rendered_map_index": None},
+ {"map_index": 3, "_rendered_map_index": None},
+ ],
+ )
+ response = test_client.get("/dags/~/dagRuns/~/taskInstances",
params={"order_by": order_by})
+ assert response.status_code == 200
+ assert [ti["map_index"] for ti in response.json()["task_instances"]]
== expected_map_indexes
+
def test_should_respond_200_for_pagination(self, test_client, session):
dag_id = "example_python_operator"
self.create_task_instances(
diff --git a/airflow-core/tests/unit/models/test_mappedoperator.py
b/airflow-core/tests/unit/models/test_mappedoperator.py
index 568db09a3c9..b5bbbd7f3a9 100644
--- a/airflow-core/tests/unit/models/test_mappedoperator.py
+++ b/airflow-core/tests/unit/models/test_mappedoperator.py
@@ -421,7 +421,7 @@ def _create_named_map_index_renders_on_failure_taskflow(*,
task_id, map_names, t
@pytest.mark.parametrize(
("template", "expected_rendered_names"),
[
- pytest.param(None, [None, None], id="unset"),
+ pytest.param(None, ["0", "1"], id="unset"),
pytest.param("", ["", ""], id="constant"),
pytest.param("{{ ti.task_id }}-{{ ti.map_index }}", ["task1-0",
"task1-1"], id="builtin"),
pytest.param("{{ ti.task_id }}-{{ map_name }}", ["task1-a",
"task1-b"], id="custom"),
@@ -459,7 +459,7 @@ def test_expand_mapped_task_instance_with_named_index(
session.flush()
indices = session.scalars(
- select(TaskInstance.rendered_map_index)
+ select(TaskInstance.rendered_map_index) # type: ignore[call-overload]
.where(
TaskInstance.dag_id == dag_id,
TaskInstance.task_id == "task1",