Skip to content

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

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

Merged

Conversation

PDavid
Copy link
Contributor

@PDavid PDavid commented Nov 22, 2024

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
@Apache9 Apache9 requested a review from NihalJain November 25, 2024 07:49
@stoty
Copy link
Contributor

stoty commented Nov 27, 2024

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
Contributor Author

PDavid commented Nov 27, 2024

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
Copy link
Contributor

NihalJain commented Jan 7, 2025

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
Contributor Author

PDavid commented Jan 7, 2025

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?

@PDavid PDavid changed the title HBASE-28983 Added static resources under hbase-rest project HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode Jan 7, 2025
@PDavid PDavid force-pushed the HBASE-28983-rest-ui-resources-missing branch from 9df1e09 to b445217 Compare January 7, 2025 11:47
@PDavid
Copy link
Contributor Author

PDavid commented Jan 7, 2025

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
Copy link
Contributor

NihalJain commented Jan 7, 2025

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
Contributor Author

PDavid commented Jan 7, 2025

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
Contributor

apurtell commented Jan 7, 2025

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

Good choice, +1 to this approach.

@NihalJain
Copy link
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
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
Contributor Author

PDavid commented Jan 8, 2025

@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
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 PDavid force-pushed the HBASE-28983-rest-ui-resources-missing branch from b445217 to 6e64191 Compare January 9, 2025 09:11
@PDavid
Copy link
Contributor Author

PDavid commented Jan 9, 2025

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

@Apache-HBase
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 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.
_ master Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for branch
+1 💚 mvninstall 3m 16s master passed
+1 💚 compile 1m 17s master passed
+1 💚 spotless 0m 46s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 3m 6s the patch passed
+1 💚 compile 1m 19s the patch passed
+1 💚 javac 1m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 xmllint 0m 0s No new issues.
+1 💚 hadoopcheck 11m 47s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 0m 43s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 17s The patch does not generate ASF License warnings.
30m 41s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile jshint
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 6e64191
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 87 (vs. ulimit of 30000)
modules C: hbase-thrift hbase-rest U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/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 40s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed 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 🆗 mvndep 0m 13s Maven dependency ordering for branch
+1 💚 mvninstall 3m 48s master passed
+1 💚 compile 1m 1s master passed
+1 💚 javadoc 0m 58s master passed
+1 💚 shadedjars 6m 34s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 27s the patch passed
+1 💚 compile 0m 55s the patch passed
+1 💚 javac 0m 55s the patch passed
+1 💚 javadoc 0m 57s the patch passed
+1 💚 shadedjars 6m 32s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 6m 49s hbase-thrift in the patch passed.
+1 💚 unit 4m 27s hbase-rest in the patch passed.
37m 54s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 6e64191
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/testReport/
Max. process+thread count 1730 (vs. ulimit of 30000)
modules C: hbase-thrift hbase-rest U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6491/5/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.

@NihalJain
Copy link
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
Contributor Author

PDavid commented Jan 9, 2025

@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
Copy link
Contributor

stoty commented Jan 9, 2025

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

@NihalJain
Copy link
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
Contributor Author

PDavid commented Feb 18, 2025

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
Copy link
Contributor

NihalJain commented Feb 19, 2025

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

@PDavid
Copy link
Contributor Author

PDavid commented Feb 19, 2025

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:master Feb 20, 2025
1 check passed
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
Contributor Author

PDavid commented Feb 20, 2025

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)
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.

5 participants