This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new bc3559d0e623 [SPARK-55387][CORE][UI] Fix DAG visualization not
rendering due to malformed DOT label
bc3559d0e623 is described below
commit bc3559d0e623f60e745f498cc5125ffbce380f94
Author: Kent Yao <[email protected]>
AuthorDate: Sun Feb 8 00:12:50 2026 +0800
[SPARK-55387][CORE][UI] Fix DAG visualization not rendering due to
malformed DOT label
### What changes were proposed in this pull request?
This PR fixes a typo in `RDDOperationGraph.scala` where an extra `}`
character was accidentally added to the DOT node label string, causing the DAG
visualization to fail rendering in both Jobs and Stages pages of the Spark Web
UI.
**Before (broken):**
```scala
s"""${node.id} [id="node_${node.id}" labelType="html" label="$label}"]"""
```
**After (fixed):**
```scala
s"""${node.id} [id="node_${node.id}" labelType="html" label="$label"]"""
```
### Why are the changes needed?
The DAG visualization in the Spark Web UI is completely broken. Instead of
rendering the graph, it shows the raw DOT source text. This affects both Jobs
and Stages views across all browsers (Firefox, Edge, Chrome) and both Spark
Shell and PySpark.
This regression was introduced in SPARK-45274 (PR #43053).
### Does this PR introduce _any_ user-facing change?
Yes. The DAG visualization in the Spark Web UI will render correctly again.
**Before:** Raw DOT graph source displayed instead of visualization
**After:** Properly rendered DAG graph
### How was this patch tested?
- Existing unit tests pass: `RDDOperationGraphSuite`, `UISeleniumSuite`
(DAG visualization test)
- Manual verification with `sc.range(0, 10, 1, 4).count()` in spark-shell
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #54171 from yaooqinn/SPARK-55387.
Authored-by: Kent Yao <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 4e86ae41de180853246b8dccbc0fe55f70ef5428)
Signed-off-by: Kent Yao <[email protected]>
---
core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
index cd057ed08c3c..4aa4954b84a9 100644
--- a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
+++ b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
@@ -269,7 +269,7 @@ private[spark] object RDDOperationGraph extends Logging {
val label = StringEscapeUtils.escapeJava(
s"${node.name} [${node.id}]$isCached$isBarrier$outputDeterministicLevel"
+
s"<br>$escapedCallsite")
- s"""${node.id} [id="node_${node.id}" labelType="html" label="$label}"]"""
+ s"""${node.id} [id="node_${node.id}" labelType="html" label="$label"]"""
}
/** Update the dot representation of the RDDOperationGraph in cluster to
subgraph.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]