Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN-11361: Remove jQuery dependency #6965

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

riya2305
Copy link

Description of PR

jQuery nowadays has little to no benefits, but has a really high maintenance cost (a lot of CVE fixes result in a jQuery upgrade ticket, which then needs thorough manual UI testing). This task is to investigate and replace the jQuery JS code to JavaScript.

Issue Links

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 jshint 0m 0s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 29s Maven dependency ordering for branch
+1 💚 mvninstall 37m 9s trunk passed
+1 💚 compile 8m 22s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 7m 16s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 2m 0s trunk passed
+1 💚 mvnsite 4m 22s trunk passed
+1 💚 javadoc 4m 12s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 3m 57s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 7m 42s trunk passed
+1 💚 shadedclient 37m 19s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 2m 44s the patch passed
+1 💚 compile 7m 37s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 7m 37s the patch passed
+1 💚 compile 7m 27s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 7m 27s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 54s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 15 new + 161 unchanged - 0 fixed = 176 total (was 161)
+1 💚 mvnsite 4m 9s the patch passed
+1 💚 javadoc 3m 57s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 3m 52s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
-1 ❌ spotbugs 2m 9s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 💚 shadedclient 40m 25s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 6m 14s hadoop-yarn-common in the patch passed.
+1 💚 unit 3m 50s hadoop-yarn-server-common in the patch passed.
+1 💚 unit 4m 31s hadoop-yarn-server-applicationhistoryservice in the patch passed.
+1 💚 unit 106m 36s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 46s hadoop-yarn-server-router in the patch passed.
-1 ❌ asflicense 1m 21s /results-asflicense.txt The patch generated 4 ASF License warnings.
336m 17s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
org.apache.hadoop.yarn.webapp.view.JQueryUI.initDataTables() concatenates strings using + in a loop At JQueryUI.java:in a loop At JQueryUI.java:[line 138]
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/1/artifact/out/Dockerfile
GITHUB PR #6965
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle jshint
uname Linux 4b986ec97fda 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / c16f2ec
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/1/testReport/
Max. process+thread count 2552 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+0 🆗 jshint 0m 1s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 24s Maven dependency ordering for branch
+1 💚 mvninstall 32m 58s trunk passed
+1 💚 compile 7m 32s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 7m 5s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 1m 57s trunk passed
+1 💚 mvnsite 4m 40s trunk passed
+1 💚 javadoc 4m 39s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 4m 25s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 7m 46s trunk passed
+1 💚 shadedclient 34m 37s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for patch
+1 💚 mvninstall 2m 44s the patch passed
+1 💚 compile 6m 56s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 6m 56s the patch passed
+1 💚 compile 6m 58s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 6m 58s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 50s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 14 new + 161 unchanged - 0 fixed = 175 total (was 161)
+1 💚 mvnsite 4m 11s the patch passed
+1 💚 javadoc 4m 7s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 4m 4s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
-1 ❌ spotbugs 2m 3s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 💚 shadedclient 34m 11s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 5m 54s hadoop-yarn-common in the patch passed.
+1 💚 unit 3m 49s hadoop-yarn-server-common in the patch passed.
+1 💚 unit 4m 30s hadoop-yarn-server-applicationhistoryservice in the patch passed.
+1 💚 unit 105m 31s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 43s hadoop-yarn-server-router in the patch passed.
-1 ❌ asflicense 0m 59s /results-asflicense.txt The patch generated 1 ASF License warnings.
321m 32s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
org.apache.hadoop.yarn.webapp.view.JQueryUI.initDataTables() concatenates strings using + in a loop At JQueryUI.java:in a loop At JQueryUI.java:[line 136]
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/2/artifact/out/Dockerfile
GITHUB PR #6965
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle jshint
uname Linux 9b7d88f3f4dd 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ac013a1
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/2/testReport/
Max. process+thread count 2774 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6965/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@p-szucs
Copy link
Contributor

p-szucs commented Aug 6, 2024

Hi @riya2305, as I can see that the CI is failing on spotbugs, missing ASF licences and there are some checkstyle issues as well. May I ask you to address them, please?

@p-szucs
Copy link
Contributor

p-szucs commented Aug 13, 2024

Hi @riya2305,
Thank you for this change, I am refreshing my JS memories and looking into it.

May I ask if we should check both UI versions regarding this change? I checked out the changes as a first step, and when I tried it out with UI v1, I saw that we got a "Uncaught ReferenceError: DataTableHelper is not defined" when loading http://localhost:8088/cluster. Are you experiencing the same on this endpoint?

@p-szucs
Copy link
Contributor

p-szucs commented Aug 16, 2024

Hi @riya2305,
As we discussed offline, turned out that the previous error was on my side. I tested the change again with the latest codeset, and this time I saw a console error on the Scheduler page, where we are still referencing JQuery, and the accordions are broke when displaying the queues.

With regards to the Datatables.js I saw that we are using an implementation of https://github.com/Mobius1/Vanilla-DataTables/tree/master, which I am not sure we can include this way under ASF license.

Probably it would be better to use that as a dependency but as I can see that repository is no longer maintained, there is a newer fork named https://github.com/fiduswriter/Simple-DataTables. But that goes under LGPL license, and we cannot use this fork based on this page: https://www.apache.org/legal/resolved.html#category-x

So I am not sure what would be the best option for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants