Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplication of Task tries in the UI (#43891) #43950

Merged
merged 1 commit into from
Nov 13, 2024

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
48 checks 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