-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Move UI to separate module #22745
Move UI to separate module #22745
Conversation
FYI: @yhwang |
e6d9808
to
dfdcf93
Compare
Also FYI @tdcmeehan if this merges, you will probably need to update the path in the CODEOWNERS file for @yhwang |
FYI, in the documentation, it's called Presto Console. should we use presto-console instead of presto-ui ? |
A good idea! - but maybe not necessary now. I suggest keeping this simple and leaving this PR as is. After this PR is merged and the UI is moved to its own module, then renaming the module could be a separate and also simple task for a followup PR. |
bd02377
to
497966d
Compare
I agree with @steveburnett 's opinion. I also feel that "UI" is slightly less ambiguous in naming than "console" where "console" could refer to a terminal or a user interface. Either way, I don't have super strong feelings but if we feel that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@ZacBlanco the SPA page doesn't work. JS files are not embedded into the HTML page. |
Thanks for pointing that out @yhwang . The issue should be solved now |
the last comment is the size of the SPA, The original size was about 821K, and now it jumps to 5.7M. Since it includes all of the JS in the webpack.conf.js. I hit this before and separated the SPA to another webpack file. I don't have solution to have them in the same webpack. If you can solve that, it would be great. Edit |
Moves the UI build to a separate module and stores the output of the build into a maven-compatible folder structure. The new module POM packages the UI as a resource-only jar. This module is now defined as a dependency in presto-main so that the files will be on the classpath for the presto server. If the UI is excluded during the build the web UI port will return a 404. This module can be exluded from the build via maven using -pl '!presto-ui'.
Thanks for pointing out the size issue too. I fixed it by including the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Also good to know the chunk
option of the html-webpack-plugin
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ZacBlanco!
@ZacBlanco why does presto-main have a dependency on presto-ui? When I run a build excluding the presto-ui module I get an error like
|
@rschlussel it's probably because the the Presto server has a dependency on the UI assets (it's packaged as part of the server). Although I can see this goes against the goal of optionally allowing one to separate out the UI. Perhaps a further refinement would be to version them separately (i.e. move it out of the monorepo entirely)? |
The dependency is used in order to force building presto-ui so that we don't accidentally forget to include it on the CP/release build. Without specifying the dependency, you can build If you build the |
yes, but the problem is that I can't build it locally because I get errors downloading node.js (presumably some kind of firewall issue we need to figure out). That's why i want to exclude it in the first place.
|
I sometimes use the UI locally launching |
There are other ways to make sure we build the UI. I agree with @rschlussel that presto-main should not depend on presto-ui. |
Description
Moves the UI to its own module which can be built in parallel or excluded entirely from the build in
presto-main
.Fixes #22741
Motivation and Context
Discussed in the TSC meeting on 2024-05-14. The UI doesn't actually depend on anything in presto-main. This also prevents having the yarn build phases generate files into the source directories.
Impact
No public facing changes.
-pl '!presto-ui'
to maven.Test Plan
./mvnw clean install -pl presto-main -am -DskipTests
and then ran each of the IcebergQueryRunner and HiveQueryRunner to test the UI. Ran a few queries and clicked on all pages to ensure that the UI loaded each page successfullyContributor checklist
Release Notes