airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Mapped Task details view "success" counts are off

Open jsnb-devoted opened this issue 2 years ago • 16 comments

Apache Airflow version

2.5.1

What happened

After the upgrade to 2.5.1 we have noticed that the counts in the details page for mapped tasks seems to be wrong. The "success" count is typically stuck at 1 and then if you look at the actual tasks there are many successful tasks.

What you think should happen instead

Here is the details page saying there is 1 successful task: Screenshot 2023-03-08 at 5 43 38 PM In the "Mapped Tasks" view you can see there are many successful tasks Screenshot 2023-03-08 at 5 43 48 PM

How to reproduce

Run a DAG with mapped tasks -- watch the success count

Operating System

Ubuntu

Versions of Apache Airflow Providers

apache-airflow-providers-amazon==7.2.1
apache-airflow-providers-cncf-kubernetes==5.2.1
apache-airflow-providers-common-sql==1.3.3
apache-airflow-providers-datadog==3.1.0
apache-airflow-providers-facebook==3.1.0
apache-airflow-providers-ftp==3.3.1
apache-airflow-providers-http==4.2.0
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-jdbc==3.3.0
apache-airflow-providers-postgres==5.4.0
apache-airflow-providers-snowflake==4.0.4
apache-airflow-providers-sqlite==3.3.1
apache-airflow-providers-ssh==3.4.0

Deployment

Official Apache Airflow Helm Chart

Deployment details

k8s on EKS with the official helm chart 1.8.0

Anything else

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

jsnb-devoted avatar Mar 09 '23 01:03 jsnb-devoted

Is auto-refresh active on the page? If you refresh the page yourself does the issue persist?

bbovenzi avatar Mar 09 '23 15:03 bbovenzi

Is auto-refresh active on the page? If you refresh the page yourself does the issue persist?

@bbovenzi yep auto-refresh is turned on and I tried manually refreshing but the issue persisted.

jsnb-devoted avatar Mar 09 '23 16:03 jsnb-devoted

I have yet to replicate this issue.

Interesting how the count is also different from the table of mapped tasks. Do you know which one is the correct count?

bbovenzi avatar Mar 10 '23 17:03 bbovenzi

@bbovenzi -- count and success are both wrong. running queued scheduled and up for retry look closer to the right numbers but I didn't scrutinize them.

jsnb-devoted avatar Mar 11 '23 18:03 jsnb-devoted

I just replicated this issue. Hope to figure out a fix soon.

bbovenzi avatar Mar 17 '23 16:03 bbovenzi

Thanks so much @bbovenzi -- I hadn't had time to dig into the code or the meta db to diagnose the issue. Appreciate you doing the legwork here.

jsnb-devoted avatar Mar 17 '23 16:03 jsnb-devoted

It affects us too, mapped tasks counters are off nearly all the time. Success counter and total mapped tasks counter are incorrect. We are using version 2.7.1.

vvnekb avatar Sep 27 '23 09:09 vvnekb

We are using version 2.7.1 and are also being affected.

leodrivera avatar Oct 10 '23 13:10 leodrivera

We are using v2.5.3 and the the bug is here as well

attilaszombati avatar Nov 27 '23 11:11 attilaszombati

We are using v2.7.3 and encountered this issue as well

josephangbc avatar Feb 03 '24 05:02 josephangbc

I know I replicated this a while ago, but then got distracted. Could anyone please provide an example dag that this happens with consistently?

bbovenzi avatar Feb 07 '24 18:02 bbovenzi

Seeing this in Airflow 2.9.1.

I cannot provide an example DAG at the moment. It is happening in a task mapping that lives inside a task group. This task mapping currently has 86 tasks. 63 are successful, 3 are running, and 20 are scheduled.

Screenshot 2024-06-06 at 10 12 37

Note the incorrect total "27 Tasks Mapped" and "success: 4".

Some of the successful tasks had retries.

The Task Instance List page shows all tasks fine, with the correct status and the correct number of items for each.

After some progress:

Screenshot 2024-06-06 at 10 47 07

carlospalol avatar Jun 06 '24 08:06 carlospalol

This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

github-actions[bot] avatar Jun 30 '24 00:06 github-actions[bot]

This issue has been closed because it has not received response from the issue author.

github-actions[bot] avatar Jul 28 '24 00:07 github-actions[bot]

This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

github-actions[bot] avatar Aug 23 '24 00:08 github-actions[bot]

We're going to have to refactor the grid_data endpoint and auto-refresh in Airflow 3 and with dag versioning. We should be able to fix this at the same time.

bbovenzi avatar Aug 26 '24 15:08 bbovenzi

We rebuilt this endpoint. Closing this. We can open a new issue if somehow it persists in Airflow 3

bbovenzi avatar Apr 22 '25 22:04 bbovenzi