Skip to content

HBASE-27802 Manage static javascript resources programatically - #7033

Merged
NihalJain merged 2 commits into
apache:branch-2from
PDavid:HBASE-27802-js-programatically-branch-2
May 27, 2025
Merged

HBASE-27802 Manage static javascript resources programatically#7033
NihalJain merged 2 commits into
apache:branch-2from
PDavid:HBASE-27802-js-programatically-branch-2

Conversation

@PDavid

Copy link
Copy Markdown
Contributor

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 23, 2025 14:51
…e#6864)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(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
Copy Markdown
ContributorAuthor

This is a backport of #6864 to branch-2. 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.

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

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker0m 4sDocker failed to build run-specific yetus/hbase:tp-13220}.
SubsystemReport/Notes
GITHUB PR#7033
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/console
versionsgit=2.17.1
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 45sDocker mode activated.
-0 ⚠️yetus0m 6sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 18sMaven dependency ordering for branch
+1 💚mvninstall3m 14sbranch-2 passed
+1 💚compile2m 13sbranch-2 passed
+1 💚javadoc2m 47sbranch-2 passed
+1 💚shadedjars6m 9sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall3m 3sthe patch passed
+1 💚compile2m 14sthe patch passed
+1 💚javac2m 14sthe patch passed
+1 💚javadoc2m 41sthe patch passed
+1 💚shadedjars6m 9spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit279m 25sroot in the patch passed.
316m 50s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7033
Optional Testsjavac javadoc unit shadedjars compile
unameLinux b1ab8af14cfc 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 7edb4bd
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/testReport/
Max. process+thread count8418 (vs. ulimit of 30000)
modulesC: hbase-server hbase-thrift hbase-rest . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 48sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 33sMaven dependency ordering for branch
+1 💚mvninstall3m 20sbranch-2 passed
+1 💚compile2m 12sbranch-2 passed
+1 💚javadoc2m 47sbranch-2 passed
+1 💚shadedjars6m 32sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 18sMaven dependency ordering for patch
+1 💚mvninstall3m 16sthe patch passed
+1 💚compile2m 12sthe patch passed
+1 💚javac2m 12sthe patch passed
+1 💚javadoc2m 41sthe patch passed
+1 💚shadedjars6m 29spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit301m 53sroot in the patch passed.
340m 39s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#7033
Optional Testsjavac javadoc unit shadedjars compile
unameLinux f09d028ccc6e 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 7edb4bd
Default JavaEclipse Adoptium-11.0.23+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/testReport/
Max. process+thread count8270 (vs. ulimit of 30000)
modulesC: hbase-server hbase-thrift hbase-rest . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 45sDocker mode activated.
-0 ⚠️yetus0m 6sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall2m 31sbranch-2 passed
+1 💚compile1m 45sbranch-2 passed
+1 💚javadoc2m 35sbranch-2 passed
+1 💚shadedjars5m 20sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for patch
+1 💚mvninstall2m 28sthe patch passed
+1 💚compile1m 48sthe patch passed
+1 💚javac1m 48sthe patch passed
+1 💚javadoc2m 29sthe patch passed
+1 💚shadedjars5m 16spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit428m 33s/patch-unit-root.txtroot in the patch failed.
463m 11s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#7033
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 5ffcbd3d7241 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 7edb4bd
Default JavaTemurin-1.8.0_412-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/testReport/
Max. process+thread count7639 (vs. ulimit of 30000)
modulesC: hbase-server hbase-thrift hbase-rest . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7033/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

One replication-related test failed with timeout in the PR build but I think that is unrelated.

@PDavid
PDavid marked this pull request as ready for review May 27, 2025 05:57
@NihalJain

Copy link
Copy Markdown
Contributor

Hi @PDavid Should I merge this and related PRs?

@PDavid

Copy link
Copy Markdown
ContributorAuthor

Hi @PDavid Should I merge this and related PRs?

Hi @NihalJain,
Yes, please merge these. Many thank in advance. 🙏

@NihalJain
NihalJain merged commit ba4f01c into apache:branch-2May 27, 2025
@ndimiduk

Copy link
Copy Markdown
Member

Ah. Thanks @NihalJain !

@PDavid
PDavid deleted the HBASE-27802-js-programatically-branch-2 branch May 27, 2025 13:09
mokai87 pushed a commit to mokai87/hbase that referenced this pull request Aug 7, 2025
…e#7033)
* HBASE-27802 Manage static javascript resources programatically (apache#6864)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(cherry picked from commit 2f9d9fc)
* HBASE-27802 Manage static javascript resources programatically (addendum: 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.
---------
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Sign up for freeto 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

@PDavid@Apache-HBase@NihalJain@ndimiduk