Skip to content

HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode - #6491

Merged
NihalJain merged 1 commit into
apache:masterfrom
PDavid:HBASE-28983-rest-ui-resources-missing
Feb 20, 2025
Merged

HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode#6491
NihalJain merged 1 commit into
apache:masterfrom
PDavid:HBASE-28983-rest-ui-resources-missing

Conversation

@PDavid

@PDavidPDavid commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

This way the hbase-webapps/static source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under hbase-server. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.

For this deleted the static directory below the Thrift project.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@PDavid
PDavid marked this pull request as ready for review November 22, 2024 15:10
@stoty

Copy link
Copy Markdown
Contributor

Let's hold this until the JS library updetes are done.

@PDavid
PDavid marked this pull request as draft November 27, 2024 09:32
@PDavid

Copy link
Copy Markdown
ContributorAuthor

Let's hold this until the JS library updetes are done.

Thanks, good idea. 👍

Changing this back to draft as after #6490 is merged, this has to be redone with the new Bootstrap version.

@NihalJain

NihalJain commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

Hey @PDavid,

Instead of copying resource, should we not just copy them in target folder via some maven plugin? We should in fact delete static folder from thrift and do the same. WDYT?

It's very easy to forget that these are just duplicates and we must keep things in sync.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

Hey @PDavid,

Instead of copying resource, should we not just copy them in target folder via some maven plugin? We should in fact delete static folder from thrift and do the same. WDYT?

It's very easy to forget that these are just duplicates and we must keep things in sync.

Thanks, great idea. 👍 I agree. When HBase runs in release mode there is a common static folder anyway so this makes sense. To be completely honest I'm not too experienced with Maven plugins yet, but I'll check it.

Also another idea I had that we could just symlink the static folder from hbase-server to hbase-rest and hbase-thrift. What do you think?

@PDavidPDavid changed the title HBASE-28983 Added static resources under hbase-rest projectHBASE-28983 Static resources are not loaded on REST web UI pages in dev modeJan 7, 2025
@PDavid
PDavidforce-pushed the HBASE-28983-rest-ui-resources-missing branch from 9df1e09 to b445217CompareJanuary 7, 2025 11:47
@PDavid

Copy link
Copy Markdown
ContributorAuthor

Tested it locally with:

  • mvn clean install -DskipTests
  • then starting HBase in standalone mode bin/start-hbase.sh
  • starting Thrift and REST servers with: bin/hbase thrift start -p 8081 and bin/hbase rest start -p 8080

Thrift Server UI:

image

REST Server UI:

image

@NihalJain

NihalJain commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

Hey @PDavid,
Instead of copying resource, should we not just copy them in target folder via some maven plugin? We should in fact delete static folder from thrift and do the same. WDYT?
It's very easy to forget that these are just duplicates and we must keep things in sync.

Thanks, great idea. 👍 I agree. When HBase runs in release mode there is a common static folder anyway so this makes sense. To be completely honest I'm not too experienced with Maven plugins yet, but I'll check it.

Also another idea I had that we could just symlink the static folder from hbase-server to hbase-rest and hbase-thrift. What do you think?

Both approaches sounds good to me. You can choose either.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

Hey @PDavid,
Instead of copying resource, should we not just copy them in target folder via some maven plugin? We should in fact delete static folder from thrift and do the same. WDYT?
It's very easy to forget that these are just duplicates and we must keep things in sync.

Thanks, great idea. 👍 I agree. When HBase runs in release mode there is a common static folder anyway so this makes sense. To be completely honest I'm not too experienced with Maven plugins yet, but I'll check it.
Also another idea I had that we could just symlink the static folder from hbase-server to hbase-rest and hbase-thrift. What do you think?

Both approaches sounds good to me. You can choose either.

Thanks, I went with copying with the Maven plugin in the end.

@apurtell

Copy link
Copy Markdown
Contributor

Thanks, I went with copying with the Maven plugin in the end.

Good choice, +1 to this approach.

@NihalJain

Copy link
Copy Markdown
Contributor

@PDavid Please let me know once we are good on this, I will go ahead and merge then. Also please raise backports for all affected branches.

@NihalJain

Copy link
Copy Markdown
Contributor

All jobs are failing / timing out due to no available nodes. Not sure, maybe something has changed for our project? CC: @Apache9, @apurtell

07:43:04 Still waiting to schedule task
07:43:04 Waiting for next available executor on ‘[hbase](https://ci-hbase.apache.org/label/hbase/)’
07:43:04 Still waiting to schedule task
07:43:04 Waiting for next available executor on ‘[hbase](https://ci-hbase.apache.org/label/hbase/)’

Source: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/4/console

@PDavid

Copy link
Copy Markdown
ContributorAuthor

@PDavid Please let me know once we are good on this, I will go ahead and merge then. Also please raise backports for all affected branches.

All jobs are failing / timing out due to no available nodes. Not sure, maybe something has changed for our project? CC: @Apache9, @apurtell

07:43:04 Still waiting to schedule task
07:43:04 Waiting for next available executor on ‘[hbase](https://ci-hbase.apache.org/label/hbase/)’
07:43:04 Still waiting to schedule task
07:43:04 Waiting for next available executor on ‘[hbase](https://ci-hbase.apache.org/label/hbase/)’

Source: ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/4/console

Many thanks @NihalJain, yes it would be great to have at least one PR build first before we merge. But I also see that PR builds lately are queued but not running. Can it may be related to https://issues.apache.org/jira/browse/HBASE-29050 ? 🤔

@PDavid
PDavid marked this pull request as ready for review January 8, 2025 08:03
@NihalJain

Copy link
Copy Markdown
Contributor

Many thanks @NihalJain, yes it would be great to have at least one PR build first before we merge. But I also see that PR builds lately are queued but not running. Can it may be related to https://issues.apache.org/jira/browse/HBASE-29050 ? 🤔

I think you are right there is a huge backlog of queued PRs. @Apache9 Should we kill all flaky tasks queued in jenkins and also merge your PR for running flaky every 4 hours, to bring it to normal state #6567? All the flaky tests are piling up very fast. See https://ci-hbase.apache.org/job/HBase-Flaky-Tests/job/branch-2.6/

…ev mode
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
@PDavid
PDavidforce-pushed the HBASE-28983-rest-ui-resources-missing branch from b445217 to 6e64191CompareJanuary 9, 2025 09:11
@PDavid

Copy link
Copy Markdown
ContributorAuthor

PR build was aborted. Rebased the branch to trigger another PR build.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 30sDocker 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.
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall3m 16smaster passed
+1 💚compile1m 17smaster passed
+1 💚spotless0m 46sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 6sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚xmllint0m 0sNo new issues.
+1 💚hadoopcheck11m 47sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 17sThe patch does not generate ASF License warnings.
30m 41s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6491
Optional Testsdupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile jshint
unameLinux f66f41c18d0e 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 revisionmaster / 6e64191
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count87 (vs. ulimit of 30000)
modulesC: hbase-thrift hbase-rest U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/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 🆗reexec0m 40sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚mvninstall3m 48smaster passed
+1 💚compile1m 1smaster passed
+1 💚javadoc0m 58smaster passed
+1 💚shadedjars6m 34sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall3m 27sthe patch passed
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
+1 💚javadoc0m 57sthe patch passed
+1 💚shadedjars6m 32spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit6m 49shbase-thrift in the patch passed.
+1 💚unit4m 27shbase-rest in the patch passed.
37m 54s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6491
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 7eff37d99c85 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 revisionmaster / 6e64191
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/testReport/
Max. process+thread count1730 (vs. ulimit of 30000)
modulesC: hbase-thrift hbase-rest U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@NihalJain

Copy link
Copy Markdown
Contributor

@PDavid Please let me know once we are good on this, I will go ahead and merge then. Also please raise backports for all affected branches.

This is a problem for 2.5 and 2.6 branch also, right? Could you please raise backports for same.?

@PDavid

Copy link
Copy Markdown
ContributorAuthor

@PDavid Please let me know once we are good on this, I will go ahead and merge then. Also please raise backports for all affected branches.

This is a problem for 2.5 and 2.6 branch also, right? Could you please raise backports for same.?

Hi @NihalJain,
Yes, your are right. The problem is also present in branch-2.5 and branch-2.6 and also branch-2.

I did not yet prepare backports for those branches yet because of the Bootstrap update is not yet merged there and this patch would conflict with the Bootstrap upgrade backports.
It is because the Bootstrap upgrade patch modifies files in the static directory under hbase-thrift and this patch deletes the static directory under hbase-thrift.

But I can prepare the backports and deal with the conflicts if needed.

@stoty

stoty commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

I think it's fine to delay the backports until after the bootstrap backports have landed.

@NihalJain

Copy link
Copy Markdown
Contributor

I did not yet prepare backports for those branches yet because of the Bootstrap update is not yet merged there and this patch would conflict with the Bootstrap upgrade backports.

Ah ok! This anyways impacts dev setup. I don't think this is a big problem. Let's hold on this one as well then. We can take this in post bootstrap change.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

As the Bootstrap upgrade was merged on master (but not yet on branch-2, branch-2.5, branch-2.6) can we maybe merge this to master? What do you think?

@NihalJain

NihalJain commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

Sounds good, so this is ready for merge to master? If that's the case let me merge this today, EOD.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

Yes, this PR is ready to merge from my side.

Just this depends on the Bootstrap upgrade changes (which was merged on master but not yet on branch-2, branch-2.5, branch-2.6 yet) so we can merge this PR on master I think.

@NihalJain
NihalJain merged commit 4e40bd5 into apache:masterFeb 20, 2025
NihalJain pushed a commit that referenced this pull request Feb 20, 2025
…ev mode (#6582) (#6491)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
(cherry picked from commit 4e40bd5)
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
@PDavid
PDavid deleted the HBASE-28983-rest-ui-resources-missing branch February 20, 2025 07:31
@PDavid

Copy link
Copy Markdown
ContributorAuthor

Many thanks for the reviews @NihalJain, @apurtell and @stoty.

PDavid added a commit to PDavid/hbase that referenced this pull request Mar 3, 2025
…ev mode (apache#6491)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
NihalJain pushed a commit that referenced this pull request Mar 5, 2025
…ev mode (#6491) (#6743)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
PDavid added a commit to PDavid/hbase that referenced this pull request Mar 24, 2025
…ev mode (apache#6491)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
PDavid added a commit to PDavid/hbase that referenced this pull request Mar 25, 2025
…ev mode (apache#6491)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
NihalJain pushed a commit that referenced this pull request Mar 25, 2025
…ev mode (#6491) (#6855)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
NihalJain pushed a commit that referenced this pull request Mar 25, 2025
…ev mode (#6491) (#6849)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
mokai87 pushed a commit to mokai87/hbase that referenced this pull request Aug 7, 2025
…ev mode (apache#6491) (apache#6743)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects.
For this deleted the static directory below the Thrift project.
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Reviewed-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4e40bd5)
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.

5 participants

@PDavid@Apache-HBase@stoty@NihalJain@apurtell