-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 all JavaScript projects into single PNPM workspace #24537
Conversation
580f31e
to
bf3a849
Compare
Seems like it would work. I don't think it would break the assemblies, since we rely on The run-build execution seems like a candidate for moving into the global config too, pretty sure you can override the configuration where required locally. It would save a few repetitions. Configuring maven clean plugin to also delete the global workspace dir might be desirable. It would no longer be deleted by default because it's not in a |
3 flaky tests on run #9791 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
Realm settings general tab tests > Test all general tab switches |
Test Replay
Screenshots
|
Review all test suite changes for PR #24537 ↗︎
Yeah, this is something I'd like to optimize as well. But I am not quite sure how to disable this 'build' step in places where we don't need it. I'll do some research on this.
Which directories are you referring to here? If we're talking about the |
The semi-conventional way to do a global plugin execution config that isn't needed everywhere is to bind the execution in the parent pom to a non-existent phase, then override that execution's phase where you need it to something that exists. I haven't tried it, but:
implies to me that there's a global working directory for frontend somewhere in the root directory |
I've just submitted #24571 couple of days ago which is about failing builds due to
I tried the same with this PR and it is still reproducible. The errors look like following (not all fail at the same time):
I think the same problem happens when opening Keycloak in vscode with Language Support for Java(TM) by Red Hat: My previous workflow included executing initial full build with maven and then continuing inside vscode, running
and I'm observing the same |
Some kind of locking might work to bypass that, but I don't think the keycloak project has ever claimed to support parallel builds. In fact, I can think of other ways that the POMs have been constructed that would break parallel builds, even outside of the javascript parts |
It did seem to work before #17401 :( The worst thing is the vscode Java language server problem, where I suspect it causes unfinished build just when opening the project in the editor. |
FYI I've added some logs & reproduce steps in #24571 (comment) |
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.
I like this PR, seems good improvement to me 👍
I've spent some time studying the javascript build and I added one suggestion inline, related to the problems I was writing about previously. It is a simple way to avoid all concurrency issues without locking or anything complicated - as well as avoiding unnecessarily executing node install and pnpm install multiple times.
I have also small additional change that I'd like to propose but I'll submit it separately, since they are not related to any lines changed in this PR.
Pushed a couple of changes, namely:
|
Correct, all of the things related to the front-end are moved as much as possible into the root of the workspace in this PR. That includes the |
f506b8a
to
53c00eb
Compare
@ASzc can I ask you to take another look at the changes here and let me know if things look good to you? |
53c00eb
to
bae2cf4
Compare
Pushed a change to bump PNPM to the latest version, rebased the PR and squashed the commits. |
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
Not sure why, but I now have some failing tests that were previously passing just fine. I'll have another look 🙄 |
5476639
to
d8fd20d
Compare
I am marking this as ready to review. Now the the the old Account Console has been removed there are no longer weird dependency mismatches preventing this from working. Additionally I've also upgraded the Node.js version to 20, which is is the latest LTS version. |
@ASzc @tsaarni @agagancarczyk could I ask you for another round of reviews? |
d8fd20d
to
7f6ea80
Compare
7f6ea80
to
adc6e6d
Compare
Pushed a little more cleanup and also updated the |
adc6e6d
to
c827632
Compare
Closes keycloak#24571 Signed-off-by: Jon Koops <jonkoops@gmail.com>
c827632
to
b772cd0
Compare
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!
This only very slightly broke the product build, and I've fixed it. Looks good |
Good to hear it was an easy fix, what caused the issue? |
I don't know exactly, but the error was that the npm binary was already present when the build setup script when to create it. I just added the force flag to |
Moves all of the JavaScript projects into a single PNPM workspace, so that dependencies can be shared. This PR also moves the Node.js and PNPM setup, and installation of dependencies into the
pluginManagement
section of the root POM so it can be re-used, reducing the boilerplate in child modules.This PR also:
pnpmInheritsProxyConfigFromMaven
setting into the root POM and disables it by default.frontend-maven-plugin
to the latest version.Closes #24571