Skip to content
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

Updating user-storage-jpa quickstart for the new distribution #302

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

pedroigor
Copy link
Contributor

No description provided.

DGuhr
DGuhr previously approved these changes Mar 8, 2022
Copy link
Contributor

@DGuhr DGuhr left a comment

Choose a reason for hiding this comment

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

Nice! :) Apart from the naming (and thats always a hard problem, but not blocking for this iteration i think ;) ) LGTM

DGuhr
DGuhr previously approved these changes Mar 8, 2022
Copy link
Contributor

@ahus1 ahus1 left a comment

Choose a reason for hiding this comment

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

I tried out the example together with the PR enabling multiple data sources and found the following things that surprised me:

  • README.md contains "Integration test of the Quickstart" that is obsolete as the integration tests don't work for this Quarkus example, yet. Consider removing that part, and also the tests from the project.
  • README.md references Java EE in the section "More Information", that is probably out of date?
  • I can create new users and log in with these users via the UI, still I can't search for these new users I added (neither by keyword, nor by selecting "View all users"). If this is expected, please add this to the README.md
  • The database setup uses an in-memory database that will drop all data once the last connection has been closed (jdbc:h2:mem:user-store), even when Keycloak is still running. To avoid this, append ;DB_CLOSE_DELAY=-1 to the DB URL; this will prevent deleting the contents. Otherwise Keycloak will forget about the data after a few idle minutes.
  • Mention in the README.md the minimum Keycloak version where this will work (Keycloak 18-SNAPSHOT), to prevent others from trying this with Keycloak 17.
  • Please create a new issue to add an integration test for this quick-start to ensure that it continues to work with new versions of Keycloak.

@DGuhr
Copy link
Contributor

DGuhr commented Mar 8, 2022

@ahus1 thanks for trying it out! just double-checked and you are right, login / creation works (that's what i have tested) but search does not. Also not sure if it should, but guess so.

@pedroigor
Copy link
Contributor Author

@ahus1 Thanks for the review. Updated the PR with most of your suggestions.

What is missing is bellow:

  • README.md contains "Integration test of the Quickstart" that is obsolete as the integration tests don't work for this Quarkus example, yet. Consider removing that part, and also the tests from the project.

Tests were removed for now and we have another issue to change this repo to run against the new distribution. See #287.

  • I can create new users and log in with these users via the UI, still I can't search for these new users I added (neither by keyword, nor by selecting "View all users"). If this is expected, please add this to the README.md

I'm able to query users by keyword and the behavior when querying all users and not showing those from the provider is the same as for the legacy distribution. I'm keeping the same instructions from legacy.

  • Mention in the README.md the minimum Keycloak version where this will work (Keycloak 18-SNAPSHOT), to prevent others from trying this with Keycloak 17.

I don't think we should include this as it is going to become obsolete very soon.

  • Please create a new issue to add an integration test for this quick-start to ensure that it continues to work with new versions of Keycloak.

As previously mentioned, see #287.

ahus1
ahus1 previously approved these changes Mar 8, 2022
Copy link
Contributor

@ahus1 ahus1 left a comment

Choose a reason for hiding this comment

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

Changes are good for now and show a minimal working provider.

DGuhr
DGuhr previously approved these changes Mar 9, 2022
user-storage-jpa/README.md Outdated Show resolved Hide resolved
user-storage-jpa/README.md Outdated Show resolved Hide resolved
@pedroigor
Copy link
Contributor Author

@dasniko Thanks. Applied the changes.

@@ -0,0 +1,3 @@
quarkus.datasource.user-store.db-kind=h2
Copy link
Contributor

Choose a reason for hiding this comment

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

@pedroigor while I am reworking the quarkus properties behaviour i noticed that the standard transaction mode is "enabled" instead of "xa" as it is for us. I am not sure if we should advertise to set transaction mode to XA here, too ( quarkus.datasource.user-store.transactions=xa ), so wanted to ask if needed

Copy link
Contributor

@DGuhr DGuhr left a comment

Choose a reason for hiding this comment

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

@pedroigor @stianst afaik this one should've been merged a while ago, no? Was irritated bc of #314 but seen this one isn't merged yet. So imo we should merge.

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.

None yet

5 participants