This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new 7a899e219f5a [SPARK-47434][WEBUI] Fix `statistics` link in 
`StreamingQueryPage`
7a899e219f5a is described below

commit 7a899e219f5a17ab12aeb8d67738025b7e2b9d9c
Author: Huw Campbell <huw.campb...@gmail.com>
AuthorDate: Mon Mar 18 07:38:10 2024 -0700

    [SPARK-47434][WEBUI] Fix `statistics` link in `StreamingQueryPage`
    
    ### What changes were proposed in this pull request?
    
    Like SPARK-24553, this PR aims to fix redirect issues (incorrect 302) when 
one is using proxy settings. Change the generated link to be consistent with 
other links and include a trailing slash
    
    ### Why are the changes needed?
    
    When using a proxy, an invalid redirect is issued if this is not included
    
    ### Does this PR introduce _any_ user-facing change?
    
    Only that people will be able to use these links if they are using a proxy
    
    ### How was this patch tested?
    
    With a proxy installed I went to the location this link would generate and 
could go to the page, when it redirects with the link as it exists.
    
    Edit: Further tested by building a version of our application with this 
patch applied, the links work now.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Page with working link
    <img width="913" alt="Screenshot 2024-03-18 at 4 45 27 PM" 
src="https://github.com/apache/spark/assets/5205457/dbcd1ffc-b7e6-4f84-8ca7-602c41202bf3";>
    
    Goes correctly to
    <img width="539" alt="Screenshot 2024-03-18 at 4 45 36 PM" 
src="https://github.com/apache/spark/assets/5205457/89111c82-b24a-4b33-895f-9c0131e8acb5";>
    
    Before it would redirect and we'd get a 404.
    
    <img width="639" alt="image" 
src="https://github.com/apache/spark/assets/5205457/1adfeba1-a1f6-4c35-9c39-e077c680baef";>
    
    Closes #45527 from HuwCampbell/patch-1.
    
    Authored-by: Huw Campbell <huw.campb...@gmail.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
    (cherry picked from commit 9b466d329c3c75e89b80109755a41c2d271b8acc)
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 .../scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala
index 7cd7db4088ac..ce3e7cde01b7 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala
@@ -174,7 +174,7 @@ private[ui] class StreamingQueryPagedTable(
 
   override def row(query: StructuredStreamingRow): Seq[Node] = {
     val streamingQuery = query.streamingUIData
-    val statisticsLink = "%s/%s/statistics?id=%s"
+    val statisticsLink = "%s/%s/statistics/?id=%s"
       .format(SparkUIUtils.prependBaseUri(request, parent.basePath), 
parent.prefix,
         streamingQuery.summary.runId)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to