You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/15 08:21:16 UTC

[GitHub] [spark] zhli1142015 opened a new pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

zhli1142015 opened a new pull request #29757:
URL: https://github.com/apache/spark/pull/29757


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Fix ".../jobs/undefined" link from "Event Timeline" in jobs page. Job page link in "Event Timeline" view is constructed by fetching job page link defined in job list below. when job count exceeds page size of job table, only links of jobs in job table can be fetched from page. Other jobs' link would be 'undefined', and links of them in "Event Timeline" are broken, and they are redirected to some wired URL like ".../jobs/undefined". This PR is fixing this wrong link issue. With this PR, job link in "Event Timeline" view would always redirect to correct job page.
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Fix wrong link (".../jobs/undefined") in jobs page. 
   ![undefinedlink](https://user-images.githubusercontent.com/10524738/93184779-83fa6d80-f6f1-11ea-8a80-1a304ca9cbb2.JPG)
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Manually Tested.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692731701






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r489086672



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];

Review comment:
       Thanks for your comments. i extracted common function `getIdForJobEntry` for selector and regex, and moved it out of `each` loop. It is only triggered by click and hover events. i think this is ok here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811563


   **[Test build #128919 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128919/testReport)** for PR 29757 at commit [`40d94f6`](https://github.com/apache/spark/commit/40d94f651706b466bd7b5026d9b0400d02d57577).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811725






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r489085097



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+        return "job/?id=" + jobId;
+      };
+
       $(this).click(function() {
         var jobPagePath = $(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
-          window.location.href = jobPagePath
+        if (jobPagePath == undefined) {

Review comment:
       Thanks @sarutak . we should remove it and use new logic, updated.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696563679


   > @zhli1142015 . Yes. You can make an independent PR to `branch-2.4`.
   
   Thanks, I create a PR to cherry-pick both SPARK-31882 and this change to branch-2.4. First, issue mentioned in SPARK-31882 also exists in branch-2.4. Second, if removing dependency of SPARK-31882, we need a different way to fix this issue, this fix looks better to me.
   Please let me know if we have different principle for such problem.
   **Cherry pick PR:** https://github.com/apache/spark/pull/29833


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 edited a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 edited a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338


   > Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   > It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   > 
   > I've made a PR to revert this change for `branch-2.4` (#29825).
   
   Thanks @sarutak . I checked issue described in `SPARK-31882` also exists in `branch-2.4`, is it ok to backport related fix to `branch-2.4`? Or, should I create a independent fix targeting `branch-2.4` for this issue?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696218693


   Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   
   I've made a PR to revert this change for `branch-2.4` (#29825).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695828831






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen closed pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen closed pull request #29757:
URL: https://github.com/apache/spark/pull/29757


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r488763955



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+        return "job/?id=" + jobId;

Review comment:
       Did you confirm this change works with HistoryServer?
   The base path for `AllJobsPage` is not `/` for HistoryServer so I'm afraid this code doesn't work with HistoryServer.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r489081845



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {

Review comment:
       Thanks @srowen . Yes, this is good idea, updated.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 edited a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 edited a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338


   > Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   > It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   > 
   > I've made a PR to revert this change for `branch-2.4` (#29825).
   
   Thanks @sarutak . I checked issue described in `SPARK-31882` also exists in `branch-2.4`, is it ok to backport related fix to `branch-2.4`? Or, should I create a independent fix targeting `branch-2.4` for this issue?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338


   > Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   > It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   > 
   > I've made a PR to revert this change for `branch-2.4` (#29825).
   
   Thanks @sarutak . Seems issue described in `SPARK-31882` also exists in `branch-2.4`, do you have plan to backport it to `branch-2.4`? Or, should I create a independent fix targeting `branch-2.4`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696487663


   @zhli1142015 . Yes. You can make an independent PR to `branch-2.4`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692730968


   **[Test build #128715 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128715/testReport)** for PR 29757 at commit [`00f5c60`](https://github.com/apache/spark/commit/00f5c60f9406723e2fcaa5ce52f44d47771c95e9).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811725






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692554880


   @sarutak , @dongjoon-hyun, could you please take a look, thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r490666317



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -42,26 +42,32 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
   setupZoomable("#application-timeline-zoom-lock", applicationTimeline);
   setupExecutorEventAction();
 
+  function getIdForJobEntry(baseElem) {
+    var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+    var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+    return jobId;
+  };
+
+  function getSelectorForJobEntry(jobId) {
+    return "#job-" + jobId;
+  };
+
   function setupJobEventAction() {
     $(".vis-item.vis-range.job.application-timeline-object").each(function() {
-      var getSelectorForJobEntry = function(baseElem) {
-        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
-        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
-       return "#job-" + jobId;
-      };
-
       $(this).click(function() {
-        var jobPagePath = $(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
-          window.location.href = jobPagePath
+        var jobId = getIdForJobEntry(this);
+        // trim last '/' if exists and append '/job/' segment and id
+        var jobPagePath = window.location.pathname.replace(/\/$/, "/job/?id=" + jobId);

Review comment:
       agreed, this should be a better approach, updated.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692731701






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692843618






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-694604555


   @zhli1142015 Thanks for the update. I've left two minor comments.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r490666338



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -42,26 +42,32 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
   setupZoomable("#application-timeline-zoom-lock", applicationTimeline);
   setupExecutorEventAction();
 
+  function getIdForJobEntry(baseElem) {
+    var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+    var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+    return jobId;
+  };

Review comment:
       @sarutak , good catch, removed them, thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811286


   Jenkins retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-694663610


   > Thank you for pinging me, @zhli1142015 . The patch looks good to me since it's revised already.
   > 
   > Just one question, this bug seems to exist in `branch-2.4`, doesn't it? If then, could you update the affected version in [SPARK-32886](https://issues.apache.org/jira/browse/SPARK-32886) accordingly? Currently, the affected versions are 3.0.0 and 3.1.0.
   
   Thanks for your comments. I just verified, this bug can be reproduced in 2.4.4. updated the JIRA.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692553777


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak edited a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692797740


   @zhli1142015 Thanks for the fix. The same issue can be in `JobPage`. Could you confirm it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696487663


   @zhli1142015 . Yes. You can make an independent PR to `branch-2.4`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 edited a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 edited a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338


   > Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   > It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   > 
   > I've made a PR to revert this change for `branch-2.4` (#29825).
   
   Thanks @sarutak . I checked issue described in `SPARK-31882` also exists in `branch-2.4`, is it ok to backport related fix to `branch-2.4`? Or, should I create a independent fix targeting `branch-2.4` for this issue?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811286






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692554527


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r488777202



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];

Review comment:
       `jobIdText` and `jobId` are calculated [here](https://github.com/apache/spark/pull/29757/files#diff-0e05a2e8f77e645ac29df29ee145a8b1R48-R49) so can we reuse them to avoid additional overhead of jQuery selector and regex?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-693093726


   > @zhli1142015 Thanks for the fix. The same issue can be in `JobPage`. Could you confirm it?
   
   Good catch, this also happens for job page. i fixed it in this PR also.
   ![stageJPG](https://user-images.githubusercontent.com/10524738/93276612-9a3c2280-f7f2-11ea-9c5c-f44e6ebeb6c8.JPG)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692730968


   **[Test build #128715 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128715/testReport)** for PR 29757 at commit [`00f5c60`](https://github.com/apache/spark/commit/00f5c60f9406723e2fcaa5ce52f44d47771c95e9).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r488684760



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {

Review comment:
       No big deal but why not just inline this?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692553777


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692797740


   @zhli1142015 Thanks for the fix. The same issue can be in `JobPage` could you confirm it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811563


   **[Test build #128919 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128919/testReport)** for PR 29757 at commit [`40d94f6`](https://github.com/apache/spark/commit/40d94f651706b466bd7b5026d9b0400d02d57577).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen closed pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen closed pull request #29757:
URL: https://github.com/apache/spark/pull/29757


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695828582


   **[Test build #128919 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128919/testReport)** for PR 29757 at commit [`40d94f6`](https://github.com/apache/spark/commit/40d94f651706b466bd7b5026d9b0400d02d57577).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692842360


   **[Test build #128715 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128715/testReport)** for PR 29757 at commit [`00f5c60`](https://github.com/apache/spark/commit/00f5c60f9406723e2fcaa5ce52f44d47771c95e9).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692554527


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r490657965



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -42,26 +42,32 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
   setupZoomable("#application-timeline-zoom-lock", applicationTimeline);
   setupExecutorEventAction();
 
+  function getIdForJobEntry(baseElem) {
+    var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+    var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+    return jobId;
+  };
+
+  function getSelectorForJobEntry(jobId) {
+    return "#job-" + jobId;
+  };
+
   function setupJobEventAction() {
     $(".vis-item.vis-range.job.application-timeline-object").each(function() {
-      var getSelectorForJobEntry = function(baseElem) {
-        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
-        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
-       return "#job-" + jobId;
-      };
-
       $(this).click(function() {
-        var jobPagePath = $(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
-          window.location.href = jobPagePath
+        var jobId = getIdForJobEntry(this);
+        // trim last '/' if exists and append '/job/' segment and id
+        var jobPagePath = window.location.pathname.replace(/\/$/, "/job/?id=" + jobId);

Review comment:
       It might be better to use the same logic as [this](https://github.com/apache/spark/blob/v3.0.0/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js#L231) to build paths.

##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -42,26 +42,32 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
   setupZoomable("#application-timeline-zoom-lock", applicationTimeline);
   setupExecutorEventAction();
 
+  function getIdForJobEntry(baseElem) {
+    var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+    var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+    return jobId;
+  };

Review comment:
       nit: `;` is not needed at the end of functions here and other new functions you added.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811725






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r488763955



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+        return "job/?id=" + jobId;

Review comment:
       Did you confirm this change works with HistoryServer?
   The base path for `AllJobsPage` is not `/` for HistoryServer so I'm afraid this code doesn't work with HistoryServer.

##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+        return "job/?id=" + jobId;
+      };
+
       $(this).click(function() {
         var jobPagePath = $(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
-          window.location.href = jobPagePath
+        if (jobPagePath == undefined) {

Review comment:
       Do we need this `if` branch?
   If we can unify the two pieces of code for `jobPagePath` with the new logic, can we remove away this `if` branch?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811725






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696416338


   > Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   > It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   > 
   > I've made a PR to revert this change for `branch-2.4` (#29825).
   
   Thanks @sarutak . Seems issue described in `SPARK-31882` also exists in `branch-2.4`, do you have plan to backport it to `branch-2.4`? Or, should I create a independent fix targeting `branch-2.4`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811563






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696137157


   Merged to master/3.0/2.4


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692728894


   Jenkins test this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zhli1142015 commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
zhli1142015 commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r489085097



##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime, offset) {
        return "#job-" + jobId;
       };
 
+      var getPathForJobEntry = function(baseElem) {
+        var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
+        var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+        return "job/?id=" + jobId;
+      };
+
       $(this).click(function() {
         var jobPagePath = $(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
-          window.location.href = jobPagePath
+        if (jobPagePath == undefined) {

Review comment:
       Thanks @sarutak . we should remove it and use new logic, updated.
   
   > @zhli1142015 Thanks for the fix. The same issue can be in `JobPage`. Could you confirm it?
   
   Good catch, this also happens for job page. i fixed it in this PR also.
   ![stageJPG](https://user-images.githubusercontent.com/10524738/93276612-9a3c2280-f7f2-11ea-9c5c-f44e6ebeb6c8.JPG)
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695828831






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-692843618






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] sarutak commented on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-696218693


   Hi all, I noticed it's not work for `branch-2.4` because `appBasePath` is absent for `branch-2.4`.
   It's introduced by `SPARK-31882` but it's not backported into `branch-2.4`.
   
   I've made a PR to revert this change for `branch-2.4` (#29825).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29757:
URL: https://github.com/apache/spark/pull/29757#issuecomment-695811563


   **[Test build #128919 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128919/testReport)** for PR 29757 at commit [`40d94f6`](https://github.com/apache/spark/commit/40d94f651706b466bd7b5026d9b0400d02d57577).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org