Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add map_index validation in categorize_task_instances#54791

Merged
jason810496 merged 2 commits intoapache:mainfrom
guan404ming:fix-bulk-ti
Aug 28, 2025
Merged

Add map_index validation in categorize_task_instances#54791
jason810496 merged 2 commits intoapache:mainfrom
guan404ming:fix-bulk-ti

Conversation

Copy link
Member

guan404ming commented Aug 21, 2025

Why

private function categorize_task_instances in bulk service would fetch all task instances based on task_id and categorize those fetched task instance as matched ones without checking their map_index, leading to the issue where we will delete all task instances with same task_id when we just want to delete some of task instances in the task

How

  • add map_index validation
  • add test for categorize_task_instances

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

guan404ming requested review from bugraoz93, ephraimbuddy, jason810496, pierrejeambrun, rawwar and shubhamraj-git as code owners August 21, 2025 17:50
boring-cyborg bot added the area:API Airflow's REST/HTTP API label Aug 21, 2025
jason810496 reviewed Aug 23, 2025
Copy link
Member

jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thanks for the PR.

guan404ming force-pushed the fix-bulk-ti branch 5 times, most recently from 4a83ef2 to 02995c7 Compare August 25, 2025 00:22
jason810496 reviewed Aug 25, 2025
guan404ming force-pushed the fix-bulk-ti branch from 02995c7 to 6ef6932 Compare August 25, 2025 15:31
guan404ming force-pushed the fix-bulk-ti branch from 6ef6932 to 5adcb03 Compare August 27, 2025 14:54
guan404ming requested a review from jason810496 August 27, 2025 15:44
jason810496 approved these changes Aug 28, 2025
Copy link
Member

jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I will check whether does this patch needs to backport to v3-0-test as well.

Not sure if the TI bulk action is included in 3.1 or 3.0.x .

jason810496 reviewed Aug 28, 2025
Copy link
Member

jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked, there isn't airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py module in v3-0-test branch. We don't need to backport this patch.

jason810496 merged commit b2c42b7 into apache:main Aug 28, 2025
107 checks passed
mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

jason810496 jason810496 approved these changes

ephraimbuddy Awaiting requested review from ephraimbuddy ephraimbuddy is a code owner

pierrejeambrun Awaiting requested review from pierrejeambrun pierrejeambrun is a code owner

rawwar Awaiting requested review from rawwar rawwar is a code owner

bugraoz93 Awaiting requested review from bugraoz93 bugraoz93 is a code owner

shubhamraj-git Awaiting requested review from shubhamraj-git shubhamraj-git is a code owner

Assignees

No one assigned

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants