Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

It was observed that there are moments where the TI tries endpoint returns duplicate TaskInstance. I have observed this to happen when the TI is in up_for_retry state.

When the TI is in up_for_retry state, we have already recorded the previous try in TI history and the TI try_number has not incremented at this time, so we must exclude this recorded TI from the taskinstance tries endpoint. We know the TI because its state is in up_for_retry, so we filter TIs with up_for_retry state when querying for the task instance tries.

Closes: #41765
(cherry picked from commit 4bc1257)

It was observed that there are moments where the TI tries endpoint returns duplicate
TaskInstance. I have observed this to happen when the TI is in up_for_retry state.

When the TI is in up_for_retry state, we have already recorded the previous try
in TI history and the TI try_number has not incremented at this time, so we must
exclude this recorded TI from the taskinstance tries endpoint. We know the TI because
its state is in up_for_retry, so we filter TIs with up_for_retry state when querying
for the task instance tries.

Closes: apache#41765
(cherry picked from commit 4bc1257)
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Nov 13, 2024
@ephraimbuddy ephraimbuddy added this to the Airflow 2.10.4 milestone Nov 13, 2024
@pierrejeambrun pierrejeambrun merged commit 510b968 into apache:v2-10-test Nov 13, 2024
1 check passed
@pierrejeambrun pierrejeambrun deleted the backport43891 branch November 13, 2024 08:48
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Dec 4, 2024
utkarsharma2 pushed a commit that referenced this pull request Dec 4, 2024
It was observed that there are moments where the TI tries endpoint returns duplicate
TaskInstance. I have observed this to happen when the TI is in up_for_retry state.

When the TI is in up_for_retry state, we have already recorded the previous try
in TI history and the TI try_number has not incremented at this time, so we must
exclude this recorded TI from the taskinstance tries endpoint. We know the TI because
its state is in up_for_retry, so we filter TIs with up_for_retry state when querying
for the task instance tries.

Closes: #41765
(cherry picked from commit 4bc1257)
utkarsharma2 pushed a commit that referenced this pull request Dec 9, 2024
It was observed that there are moments where the TI tries endpoint returns duplicate
TaskInstance. I have observed this to happen when the TI is in up_for_retry state.

When the TI is in up_for_retry state, we have already recorded the previous try
in TI history and the TI try_number has not incremented at this time, so we must
exclude this recorded TI from the taskinstance tries endpoint. We know the TI because
its state is in up_for_retry, so we filter TIs with up_for_retry state when querying
for the task instance tries.

Closes: #41765
(cherry picked from commit 4bc1257)
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 type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants