Skip to content

Fix PoolBar links using wrong query params for task instances page#64182

Open
Karthikeya1500 wants to merge 8 commits intoapache:mainfrom
Karthikeya1500:fix/poolbar-task-instance-filter-params
Open

Fix PoolBar links using wrong query params for task instances page#64182
Karthikeya1500 wants to merge 8 commits intoapache:mainfrom
Karthikeya1500:fix/poolbar-task-instance-filter-params

Conversation

@Karthikeya1500
Copy link

Clicking on a pool slot segment (e.g. running or queued) in the Pools page navigates to /task_instances but the state and pool filters don't get applied. The task instances page shows unfiltered results instead.

The root cause is that PoolBar.tsx uses SearchParamsKeys.STATE (state) and SearchParamsKeys.POOL (pool), but the TaskInstances page actually reads from SearchParamsKeys.TASK_STATE (task_state) and SearchParamsKeys.POOL_NAME_PATTERN (pool_name_pattern). The parameter name mismatch causes the filters to be silently ignored.

I also noticed slot.color was being used as the state value instead of slot.slotType. They happen to match for non-open slots right now, but slotType is the semantically correct value to pass as a task instance state filter.

- to={`/task_instances?${SearchParamsKeys.STATE}=${slot.color}&${SearchParamsKeys.POOL}=${pool.name}`}
+ to={`/task_instances?${SearchParamsKeys.TASK_STATE}=${slot.slotType}&${SearchParamsKeys.POOL_NAME_PATTERN}=${pool.name}`}

The PoolBar component links to the task instances page using
SearchParamsKeys.STATE ('state') and SearchParamsKeys.POOL ('pool'),
but the TaskInstances page reads filters from SearchParamsKeys.TASK_STATE
('task_state') and SearchParamsKeys.POOL_NAME_PATTERN ('pool_name_pattern').

This mismatch causes clicking a pool slot segment (running, queued, etc.)
to navigate to the task instances page without any filters being applied,
showing all task instances instead of those filtered by the clicked state
and pool.

Fix by using the correct search parameter keys (TASK_STATE and
POOL_NAME_PATTERN) and slot.slotType instead of slot.color for the
state filter value.
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 24, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 24, 2026
@bbovenzi bbovenzi added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Mar 25, 2026
@bbovenzi bbovenzi added this to the Airflow 3.1.9 milestone Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants