Skip to content

[v3-2-test] UI: Filter task instances by rendered map index#67163

Merged
vatsrahul1001 merged 1 commit into
apache:v3-2-testfrom
astronomer:backport-66008
May 19, 2026
Merged

[v3-2-test] UI: Filter task instances by rendered map index#67163
vatsrahul1001 merged 1 commit into
apache:v3-2-testfrom
astronomer:backport-66008

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

Backport of #66008 to v3-2-test.

Cherry-picked from 73a6641.

Conflict resolution:

  • airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py — context drift on model_dump(exclude=...). v3-2-test keeps its 2-element exclude set (task_outlets, outlet_events); retry_delay_seconds / retry_reason are not on this release branch. Added the PR's actual change (the rendered_map_index_rendered_map_index rename) on top.
  • airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.py — pre-commit's ruff autofix removed the now-unused from tests_common.test_utils.config import conf_vars import (the only usage was the test the PR rewrote, and the TestPatchTaskInstance decorators that needed it on main aren't on v3-2-test).

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

* 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 apache#51820.

* Fix rebase linting

* Fix mysql tests

* Fix conflicts

---------

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
(cherry picked from commit 73a6641)
@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default labels May 19, 2026
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.2.2 milestone May 19, 2026
@vatsrahul1001 vatsrahul1001 added the type:misc/internal Changelog: Misc changes that should appear in change log label May 19, 2026
@vatsrahul1001 vatsrahul1001 merged commit e75d883 into apache:v3-2-test May 19, 2026
110 checks passed
@vatsrahul1001 vatsrahul1001 deleted the backport-66008 branch May 19, 2026 11:28
vatsrahul1001 added a commit that referenced this pull request May 20, 2026
* 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 73a6641)

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request May 20, 2026
* 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 73a6641)

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request May 21, 2026
* 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 73a6641)

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default type:misc/internal Changelog: Misc changes that should appear in change log

2 participants