Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Profile activation for WF app server doesn't properly work for Windows#21948

Merged
hmlnarik merged 1 commit intokeycloak:mainfrom
mabartos:KC-21284
Jul 27, 2023
Merged

Profile activation for WF app server doesn't properly work for Windows#21948
hmlnarik merged 1 commit intokeycloak:mainfrom
mabartos:KC-21284

Conversation

@mabartos
Copy link
Contributor

@mabartos mabartos commented Jul 25, 2023

Fixes: #21284
Related-to: #21716

For Unix-like systems, the WildFly app server is built by default as the profile app-server-wildfly is activated by default. However, for Windows systems, the other profile(windows-properties-cli) is activated, and based on the Maven profile activation principles[1], profiles activated by the activeByDefault property are disabled.

It means the WildFly app server is not implicitly built on Windows systems.
For Windows, we can specify another profile for building the module and avoid the logic behind the activeByDefault.

However, for our pipeline, when some other app server is used, the Wildfly would always be built as well (for Windows). We can prevent it by providing a property(skipAppServerWildfly) for disabling the profile for Windows. On a local Windows machine, even when the other app server is specified, the WF is built, but I don't see a big problem around that, as the approach with the WildFly app server as the default one, is only temporary.

Keycloak pipeline MR: https://keycloak-gitlab.com/keycloak/keycloak-pipeline/-/merge_requests/276

[1] https://maven.apache.org/guides/introduction/introduction-to-profiles.html#implicit_profile_activation

@miquelsi Could you please check it?
cc: @ahus1 @Pepo48

@mabartos mabartos requested review from a team as code owners July 25, 2023 10:34
@mabartos mabartos requested a review from a team July 25, 2023 10:34
@mabartos mabartos requested a review from a team as a code owner July 25, 2023 10:34
@mabartos mabartos requested a review from miquelsi July 25, 2023 10:34
@mabartos
Copy link
Contributor Author

mabartos commented Jul 25, 2023

@mabartos
Copy link
Contributor Author

The GHA failures are not related to this PR.

Copy link
Contributor

@Pepo48 Pepo48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the PR on my local W11 machine - everything worked as expected. Nice work, @mabartos. Thanks.

@mabartos
Copy link
Contributor Author

@Pepo48 Thanks for your review. I've also tried to verify it on Win machine, and everything works as expected as well. Even the skip mechanism for other app servers in the pipeline. Pipeline tests look also very promising; not finished yet.

@miquelsi jfyi

@mabartos
Copy link
Contributor Author

Failures in both pipelines are not related to these changes. Everything's working as expected. Even for the adapter testing of other JBoss-based app servers, only the particular app server is built.

@miquelsi Could you please review this PR? Thanks!

Adapter pipeline: https://keycloak-jenkins.com/view/Keycloak/job/universal-test-pipeline-adapters/1767/
Server pipeline: https://keycloak-jenkins.com/view/Keycloak/job/universal-test-pipeline-server/2824/

Copy link
Contributor

@miquelsi miquelsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mabartos!

@hmlnarik hmlnarik merged commit 4b36da0 into keycloak:main Jul 27, 2023
@Pepo48
Copy link
Contributor

Pepo48 commented Jul 27, 2023

@mabartos (cc: @vmuzikar) what about backporting this to 22 release?

@mabartos
Copy link
Contributor Author

mabartos commented Jul 27, 2023

@Pepo48 Yep, good point. I'm in to include the fix there as Win users will be finally able to build Keycloak from the source code. 🥶

EDIT: Created PR for 22.x release - #22037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile activation for WF app server doesn't properly work for Windows

4 participants