This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-3-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 595063cb8056670545e1612a94f2c31c7234da8d Author: Brent Bovenzi <brent.bove...@gmail.com> AuthorDate: Tue Jun 7 13:25:31 2022 +0200 Check that edge nodes actually exist (#24166) (cherry picked from commit 3e51d8029ba34d3a76b3afe53e257f1fb5fb9da1) --- airflow/www/static/js/dag_dependencies.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/dag_dependencies.js b/airflow/www/static/js/dag_dependencies.js index 4e342288ef..81ba457522 100644 --- a/airflow/www/static/js/dag_dependencies.js +++ b/airflow/www/static/js/dag_dependencies.js @@ -198,8 +198,14 @@ const renderGraph = () => { g.setNode(node.id, node.value); }); + // filter out edges that point to non-existent nodes + const realEdges = edges.filter((e) => { + const edgeNodes = nodes.filter((n) => n.id === e.u || n.id === e.v); + return edgeNodes.length === 2; + }); + // Set edges - edges.forEach((edge) => { + realEdges.forEach((edge) => { g.setEdge(edge.u, edge.v, { curve: d3.curveBasis, arrowheadClass: 'arrowhead',