Skip to content

UI: Filter task instances by rendered map index#66008

Merged
vatsrahul1001 merged 5 commits into
apache:mainfrom
astronomer:feature/search-rendered-map-index
May 18, 2026
Merged

UI: Filter task instances by rendered map index#66008
vatsrahul1001 merged 5 commits into
apache:mainfrom
astronomer:feature/search-rendered-map-index

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun commented Apr 28, 2026

Summary

Closes #51820.

Adds a rendered_map_index exact-match filter (list-of-strings, ANY_EQUAL) to the public listMapped and listTaskInstances endpoints, mirroring the existing map_index filter, and surfaces it in the Task Instances filter bar in the UI. Users can now find a dynamically mapped task by the named mapping that's already shown in the column — no more "search by what you see" gap.

Test plan

  • Unit tests pass (pytest test_task_instances.py -k rendered_map_index_filter)
  • TypeScript + ESLint clean
  • Manually verified in breeze with the customer-reported curl: ?rendered_map_index=1 now returns the row whose _rendered_map_index is NULL.
Screen.Recording.2026-04-30.at.16.02.11.mov

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

@pierrejeambrun pierrejeambrun force-pushed the feature/search-rendered-map-index branch from fbc83c1 to 7c5350e Compare April 28, 2026 14:32
@pierrejeambrun pierrejeambrun added this to the Airflow 3.2.2 milestone Apr 29, 2026
@bbovenzi bbovenzi added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 29, 2026
@bbovenzi
Copy link
Copy Markdown
Contributor

Rendered Map Index seems to be searching by the index number but not the rendered string.

Screenshot 2026-04-29 at 12 29 23 PM Screenshot 2026-04-29 at 12 29 28 PM
@pierrejeambrun
Copy link
Copy Markdown
Member Author

pierrejeambrun commented Apr 30, 2026

Similarly to the 'map_index' this is an exact filter, not a search.

But since it's a string it probably makes more sense. Let me update that, it was my first draft but moved away from it for consistency.

@pierrejeambrun pierrejeambrun force-pushed the feature/search-rendered-map-index branch from 7c5350e to d00d73b Compare April 30, 2026 13:58
@bbovenzi
Copy link
Copy Markdown
Contributor

bbovenzi commented May 4, 2026

Merge conflicts and MySQL test failure

@vatsrahul1001
Copy link
Copy Markdown
Contributor

@pierrejeambrun can you resolve conflicts and look into failing test?

@bbovenzi bbovenzi force-pushed the feature/search-rendered-map-index branch from d00d73b to 232d27c Compare May 12, 2026 19:02
pierrejeambrun and others added 3 commits May 13, 2026 10:45
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.
@bbovenzi bbovenzi force-pushed the feature/search-rendered-map-index branch from 63cd8d5 to da85d11 Compare May 13, 2026 14:45
@pierrejeambrun pierrejeambrun force-pushed the feature/search-rendered-map-index branch from 58b2cbe to b6b61af Compare May 18, 2026 09:33
@vatsrahul1001 vatsrahul1001 merged commit 73a6641 into apache:main May 18, 2026
142 checks passed
@vatsrahul1001 vatsrahul1001 deleted the feature/search-rendered-map-index branch May 18, 2026 11:46
@github-actions
Copy link
Copy Markdown
Contributor

Backport failed to create: v3-2-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 73a6641 v3-2-test

This should apply the commit to the v3-2-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@vatsrahul1001
Copy link
Copy Markdown
Contributor

@pierrejeambrun could help with manual backport?

vatsrahul1001 added a commit that referenced this pull request May 19, 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 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:translations area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch translation:default

3 participants