Skip to content

Conversation

@PDavid
Copy link
Contributor

@PDavid PDavid commented May 25, 2025

As is

Currently, the static JavaScript, CSS resources need to be manually managed. That is, if any of these has to be updated, we will be required to download them from web and place them under the appropriate path. This can be cumbersome.

After

To be able to manage them with minimal manual effort we could manage them as part of build.

Approach

This solution is very similar to how we manage the websitestatic resources in our build: #6668

Download and extract the UI resources as webjars using the maven-dependency-plugin in our build. It will only copy the required files to the hbase-server/target/hbase-webapps/static directory.

The REST and Thrift projects copies the static JavaScript, CSS resources from hbase-server - as before.

This way the no new dependency is packaged into the application, only the required JS, CSS files are copied and packaged.

Upgrading in the future

From now on upgrading the static JavaScript, CSS resources means to:

Upgrades

Also upgraded the following static resources to current latest version:

  • jquery: 3.5.1 -> 3.7.1
  • tablesorter: 2.31.3 -> 2.32.0

PDavid added 2 commits May 22, 2025 17:42
…e#6864)

Signed-off-by: Nick Dimiduk <[email protected]>
Signed-off-by: Nihal Jain <[email protected]>
(cherry picked from commit 2f9d9fc)
…dum: Fix not working popovers on UI)

Popovers were not working on the UI and the following JS error was logged to browser console:

```
Uncaught TypeError: i.createPopper is not a function
```

This is because popper.js was not available on the page for Bootstrap.

Solution: We use bootstrap.bundle.min.js instead which includes both popper.js and Bootstrap.
@PDavid
Copy link
Contributor Author

PDavid commented May 25, 2025

This is a backport of #6864 to branch-2.5. This PR already includes the addendum fix (#7018).

I cherry-picked the master commit and resolved the conflicts. The reason this patch was not applying clearly is that on master we have the website and the reference guide (asciidoc) building code but on other branches we don't.

@PDavid
Copy link
Contributor Author

PDavid commented May 25, 2025

I tested this backported patch the same way as I described here: #6864 (comment)

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 46s 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 🆗 jshint 0m 0s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-2.5 Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for branch
+1 💚 mvninstall 3m 21s branch-2.5 passed
+1 💚 compile 5m 46s branch-2.5 passed
+1 💚 spotless 0m 46s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for patch
+1 💚 mvninstall 3m 4s the patch passed
+1 💚 compile 5m 44s the patch passed
+1 💚 javac 5m 44s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 xmllint 0m 0s No new issues.
+1 💚 hadoopcheck 22m 34s Patch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6 3.4.0.
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 37s The patch does not generate ASF License warnings.
45m 53s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7031
Optional Tests dupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile jshint
uname Linux b6f2af7dfdb5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.5 / fd61e10
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 79 (vs. ulimit of 30000)
modules C: hbase-server hbase-thrift hbase-rest . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/console
versions git=2.34.1 maven=3.9.8 xmllint=20913
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 3m 18s branch-2.5 passed
+1 💚 compile 2m 15s branch-2.5 passed
+1 💚 javadoc 3m 20s branch-2.5 passed
+1 💚 shadedjars 6m 31s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 3m 12s the patch passed
+1 💚 compile 2m 18s the patch passed
+1 💚 javac 2m 18s the patch passed
-0 ⚠️ javadoc 2m 7s /results-javadoc-javadoc-root.txt root generated 10 new + 82 unchanged - 10 fixed = 92 total (was 92)
+1 💚 shadedjars 6m 10s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 37m 40s /patch-unit-root.txt root in the patch failed.
72m 39s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7031
Optional Tests javac javadoc unit shadedjars compile
uname Linux ad9b5b3778fe 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.5 / fd61e10
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/testReport/
Max. process+thread count 2323 (vs. ulimit of 30000)
modules C: hbase-server hbase-thrift hbase-rest . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 45s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for branch
+1 💚 mvninstall 3m 17s branch-2.5 passed
+1 💚 compile 2m 9s branch-2.5 passed
+1 💚 javadoc 2m 42s branch-2.5 passed
+1 💚 shadedjars 6m 5s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 16s Maven dependency ordering for patch
+1 💚 mvninstall 3m 1s the patch passed
+1 💚 compile 2m 7s the patch passed
+1 💚 javac 2m 7s the patch passed
+1 💚 javadoc 2m 36s the patch passed
+1 💚 shadedjars 6m 1s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 244m 47s root in the patch passed.
280m 46s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7031
Optional Tests javac javadoc unit shadedjars compile
uname Linux d44bd2c2beb5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.5 / fd61e10
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/testReport/
Max. process+thread count 7995 (vs. ulimit of 30000)
modules C: hbase-server hbase-thrift hbase-rest . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 54s Docker mode activated.
-0 ⚠️ yetus 0m 7s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+0 🆗 mvndep 0m 18s Maven dependency ordering for branch
+1 💚 mvninstall 4m 48s branch-2.5 passed
+1 💚 compile 3m 11s branch-2.5 passed
+1 💚 javadoc 4m 23s branch-2.5 passed
+1 💚 shadedjars 7m 13s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for patch
+1 💚 mvninstall 4m 31s the patch passed
+1 💚 compile 2m 56s the patch passed
+1 💚 javac 2m 56s the patch passed
+1 💚 javadoc 4m 1s the patch passed
+1 💚 shadedjars 7m 24s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 373m 0s /patch-unit-root.txt root in the patch failed.
461m 11s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7031
Optional Tests javac javadoc unit shadedjars compile
uname Linux 62fca0cc4e5e 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.5 / fd61e10
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/testReport/
Max. process+thread count 7962 (vs. ulimit of 30000)
modules C: hbase-server hbase-thrift hbase-rest . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7031/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid
Copy link
Contributor Author

PDavid commented May 26, 2025

There were test failures in the PR build but to me those look unrelated.

@PDavid PDavid marked this pull request as ready for review May 26, 2025 05:04
@NihalJain NihalJain merged commit 676016d into apache:branch-2.5 May 27, 2025
1 check failed
@PDavid PDavid deleted the HBASE-27802-js-programatically-branch-2.5 branch May 27, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants