Skip to content

HBASE-27802 Manage static javascript resources programatically - #7020

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

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

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 22, 2025 17:28
…e#6864)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(cherry picked from commit 2f9d9fc)
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

PDavid commented May 23, 2025

Copy link
Copy Markdown
ContributorAuthor

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

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker0m 15sDocker failed to build run-specific yetus/hbase:tp-31261}.
SubsystemReport/Notes
GITHUB PR#7020
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7020/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 49sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+0 🆗jshint0m 0sjshint was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ branch-2.6 Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for branch
+1 💚mvninstall3m 6sbranch-2.6 passed
+1 💚compile5m 58sbranch-2.6 passed
+1 💚spotless0m 47sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 19sMaven dependency ordering for patch
+1 💚mvninstall2m 59sthe patch passed
+1 💚compile5m 48sthe patch passed
+1 💚javac5m 48sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚xmllint0m 0sNo new issues.
+1 💚hadoopcheck16m 31sPatch does not cause any errors with Hadoop 2.10.2 or 3.3.6 3.4.0.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 39sThe patch does not generate ASF License warnings.
39m 49s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7020/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7020
Optional Testsdupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile jshint
unameLinux c401017f633d 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.6 / 7606d4b
Default JavaEclipse Adoptium-11.0.23+9
Max. process+thread count79 (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-7020/1/console
versionsgit=2.34.1 maven=3.9.8 xmllint=20913
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 🆗reexec1m 27sDocker 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.6 Compile Tests _
+0 🆗mvndep0m 26sMaven dependency ordering for branch
+1 💚mvninstall4m 50sbranch-2.6 passed
+1 💚compile3m 28sbranch-2.6 passed
+1 💚javadoc4m 21sbranch-2.6 passed
+1 💚shadedjars9m 7sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for patch
+1 💚mvninstall4m 36sthe patch passed
+1 💚compile3m 16sthe patch passed
+1 💚javac3m 16sthe patch passed
+1 💚javadoc4m 54sthe patch passed
+1 💚shadedjars15m 6spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit42m 58s/patch-unit-root.txtroot in the patch failed.
99m 48s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7020/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#7020
Optional Testsjavac javadoc unit shadedjars compile
unameLinux ed0f99a93f5a 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.6 / 7606d4b
Default JavaEclipse Adoptium-11.0.23+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7020/1/testReport/
Max. process+thread count1419 (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-7020/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

Some tests failed in the PR build but to me those seem unrelated.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

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

@PDavid
PDavid marked this pull request as ready for review May 25, 2025 06:40
@NihalJain
NihalJain merged commit 0abd325 into apache:branch-2.6May 27, 2025
@PDavid
PDavid deleted the HBASE-27802-js-programatically-branch-2.6 branch May 27, 2025 13:10
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@ndimiduk@NihalJain