You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/14 14:44:39 UTC
[airflow] 01/01: Make sure all mapped nodes are updated.
This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch fix-graph-mapped-label
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit f0606b8e0987e3b229f2ef4f7363ff79ef074e63
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Thu Apr 14 10:43:09 2022 -0400
Make sure all mapped nodes are updated.
---
airflow/www/static/js/graph.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/airflow/www/static/js/graph.js b/airflow/www/static/js/graph.js
index ea7fc10cb7..ecdcb921a9 100644
--- a/airflow/www/static/js/graph.js
+++ b/airflow/www/static/js/graph.js
@@ -102,7 +102,12 @@ const updateNodeLabels = (node, instances) => {
haveLabelsChanged = true;
}
- if (node.children) return node.children.some((n) => updateNodeLabels(n, instances));
+ if (node.children) {
+ // Iterate through children and return true if at least one has been changed
+ const updatedNodes = node.children.map((n) => updateNodeLabels(n, instances));
+ return updatedNodes.some((changed) => changed);
+ }
+
return haveLabelsChanged;
};