Make UI module independent sub-project#4650
Conversation
8157a60 to
d17d65e
Compare
dsmiley
left a comment
There was a problem hiding this comment.
I think we should use the same gradle wrapper, at least.
It's not clear how new master Solr build acquires the UI artifacts to serve.
There was a problem hiding this comment.
woah; can't we re-use the gradle wrapper of the parent project?
There was a problem hiding this comment.
I know it is possible through the terminal by using ./gradlew -p ui/ [some-task], but I haven't figured out yet how to let IntelliJ know that it should use the wrapper from the root project. Since it is no longer in the settings.gradle.kts listed as included module, it is not loaded in the IDE, nor by gradle.
Once I figure that out I will also update the README.md (documentation) to include instructions what to do to load the module correctly.
This is why it is still a draft.
It is not clear because it is not solved yet. 🫤 I haven't figured it out yet how to do that the proper way (e.g. where can we publish artifacts, how to build it in advance for a release, how to retrieve artifacts?). I wanted to look into the solution we use for lucene and see if it can be reliably used for the UI in releases as well. Another thing that I am unsure is all the licensing stuff. We would have to treat it completely different. I believe the best option we have is to display open-source licenses in the UI somewhere, but for that we would have to retrieve them first. All the project configurations are removed, which is both a blessing and a curse as you can see. If you have any input on how to solve specific issues, feel free to leave a comment or commit to this PR. Happy to colaborate on this one. :) |
…hash and checksum
See discussion https://lists.apache.org/thread/onc0zyyp8tjoj3fdg3bmpnh9cqsgjhy6
Description
We have noticed slow build times and problems related to the Admin UI module that requires developers to disable the module entirely, which led to other dependency resolution issues.
This PR attempts to separate the module from the rest of the project by making it an independent sub-project.
Solution
The approach that was picked is a completely independent gradle project. Some important changes:
solrmodules are removed, allowing the UI module to use simpler buildsWe should evaluate before merging which of the configurations or routines we want to keep and apply to this module as well.
The module is no longer included as a configuration or task dependency as implemented before. Instead, the webapp now has to fetch the UI artifacts from [TODO].
Developers can call
./gradlew dev -Psolr.ui.buildFromSource=trueto build the UI module locally and include the artifacts from the current state, or alternatively define a commit (and optionally a checksum for validation) in thegradle/solr-ui.propertiesto download the UI bundle from the nightlies server.A guard has been added for specific release tasks that prevents using a nightly build artifact, and forces the UI to be built from source.
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.