Skip to content

Refactor Profile - #15341

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
stianst:refactor-profile
Nov 7, 2022
Merged

pedroigor merged 1 commit into
keycloak:mainfrom
stianst:refactor-profile

Conversation

@stianst

@stianst stianst commented Nov 4, 2022

Copy link
Copy Markdown
Contributor

Closes #15206

@stianst
stianst requested a review from pedroigor November 4, 2022 07:09

@stianst stianst Nov 4, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's no longer CLI output at startup to warn for preview/experimental features, so not sure how to test this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add some debug/trace logging? It should be simpler and only require configuring the log-level to the tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to using a single log statement, and output both for build and start. Doesn't hurt to output for both in case folks are using an optimized build from elsewhere or something they wouldn't necessarily see the build output at all.

@stianst

stianst commented Nov 4, 2022

Copy link
Copy Markdown
Contributor Author

@pedroigor Initially I also moved Feature into a separate class, but changed it back for now since it made so many changes making it hard to review. Planning to do the move after this PR is removed so there's a separate PR just for moving stuff around, and also move Profile into a separate package.

@pedroigor pedroigor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice to see most of the profile setup being done at built time. It should help save some time at startup time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add some debug/trace logging? It should be simpler and only require configuring the log-level to the tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can do a follow-up but it should be possible to avoid installing the PropertiesFileProfileConfigResolver to the distribution but only during tests.

This can be done using a conditional build step like here

.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wonder if it wouldn't be nice for folks to have the option of using conf/profile.properties. Plan is to extend more on the profile stuff in the future to leverage it more, and could be nice to be able to separate out that part from the other config perhaps?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My only argument against it is that we have now a configuration schema and we should rely on it whenever possible to configure the server.

For now, I would not introduce another file but just rely on the existing configuration sources (cli, keycloak.conf, etc)

@stianst
stianst requested a review from pedroigor November 6, 2022 19:09
@stianst
stianst marked this pull request as ready for review November 6, 2022 19:09
@pedroigor
pedroigor merged commit 1de9c20 into keycloak:main Nov 7, 2022
@stianst
stianst deleted the refactor-profile branch December 5, 2022 06:34
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.

Refactor of Profile

2 participants