You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2024/01/26 06:32:07 UTC
(spark) branch master updated: [SPARK-46872][CORE] Recover `log-view.js` to be non-module
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 1eedb7507ae2 [SPARK-46872][CORE] Recover `log-view.js` to be non-module
1eedb7507ae2 is described below
commit 1eedb7507ae23d069e65a40c202173a709c5e94d
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Thu Jan 25 22:31:56 2024 -0800
[SPARK-46872][CORE] Recover `log-view.js` to be non-module
### What changes were proposed in this pull request?
This PR aims to recover `log-view.js` to be no-module to fix loading issue.
### Why are the changes needed?
- #43903
![Screenshot 2024-01-25 at 9 08 48 PM](https://github.com/apache/spark/assets/9700541/830fadc8-ab1c-4cf4-9e56-493f9553b3ae)
### Does this PR introduce _any_ user-facing change?
No. This is a recovery to the status before SPARK-46003 which is not released yet.
### How was this patch tested?
Manually.
- Checkout SPARK-46003 commit and build.
- Start Master and Worker.
- Open `Incognito` or `Private` mode browser and go to Worker Log.
- Check `initLogPage` error via the developer tools
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #44896 from dongjoon-hyun/SPARK-46872.
Authored-by: Dongjoon Hyun <dh...@apple.com>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
core/src/main/resources/org/apache/spark/ui/static/log-view.js | 4 +---
core/src/main/scala/org/apache/spark/ui/UIUtils.scala | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/core/src/main/resources/org/apache/spark/ui/static/log-view.js b/core/src/main/resources/org/apache/spark/ui/static/log-view.js
index eaf7130e974b..0b917ee5c8d8 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/log-view.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/log-view.js
@@ -17,8 +17,6 @@
/* global $ */
-import {getBaseURI} from "./utils.js";
-
var baseParams;
var curLogLength;
@@ -60,7 +58,7 @@ function getRESTEndPoint() {
// If the worker is served from the master through a proxy (see doc on spark.ui.reverseProxy),
// we need to retain the leading ../proxy/<workerid>/ part of the URL when making REST requests.
// Similar logic is contained in executorspage.js function createRESTEndPoint.
- var words = getBaseURI().split('/');
+ var words = (document.baseURI || document.URL).split('/');
var ind = words.indexOf("proxy");
if (ind > 0) {
return words.slice(0, ind + 2).join('/') + "/log";
diff --git a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
index d124717ea85a..14255d276d66 100644
--- a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
@@ -220,7 +220,7 @@ private[spark] object UIUtils extends Logging {
<script src={prependBaseUri(request, "/static/initialize-tooltips.js")}></script>
<script src={prependBaseUri(request, "/static/table.js")}></script>
<script src={prependBaseUri(request, "/static/timeline-view.js")}></script>
- <script type="module" src={prependBaseUri(request, "/static/log-view.js")}></script>
+ <script src={prependBaseUri(request, "/static/log-view.js")}></script>
<script src={prependBaseUri(request, "/static/webui.js")}></script>
<script>setUIRoot('{UIUtils.uiRoot(request)}')</script>
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org