Skip to content

Conversation

@mabartos
Copy link
Contributor

WIP

@mabartos mabartos changed the title Provide simple validation with Jakarta/Hibernate Validation [admin-v2] Provide simple validation with Jakarta/Hibernate Validation Jul 11, 2025
Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.model.session.OfflineSessionPersistenceTest#testPersistenceMultipleNodesClientSessionsAtRandomNode

Keycloak CI - Store Model Tests

java.lang.AssertionError: 
Can't retrieve offline session for c6d2ca80-e856-4023-b47f-8af1a563ebc4
Expected: not null
     but: was null
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
...

Report flaky test

@mabartos mabartos force-pushed the jakartaValidation branch from 9007ef0 to 5c25c25 Compare July 14, 2025 10:35
@mabartos mabartos self-assigned this Jul 17, 2025
@vmuzikar vmuzikar added the team/admin-api-wg Admin API v2 Working Group label Jul 21, 2025
@mabartos mabartos force-pushed the feature/admin-api-v2 branch from 562be58 to aadbf3f Compare July 22, 2025 11:19
@mabartos mabartos force-pushed the jakartaValidation branch from 5c25c25 to 34ac303 Compare July 22, 2025 13:49
@mabartos mabartos changed the title [admin-v2] Provide simple validation with Jakarta/Hibernate Validation [admin-api-v2] Provide simple validation with Jakarta/Hibernate Validation Jul 22, 2025
Copy link
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

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

I think it's a good start and we can even merge as is. It'd be good though to have a follow-up to showcase some custom logic validation.

@mabartos mabartos marked this pull request as ready for review August 4, 2025 14:24
@mabartos mabartos requested review from a team as code owners August 4, 2025 14:24
@mabartos mabartos merged commit 266bb90 into keycloak:feature/admin-api-v2 Aug 4, 2025
67 of 75 checks passed
@mabartos
Copy link
Contributor Author

mabartos commented Aug 4, 2025

@vmuzikar Thanks, yep I'd say it's a good start for this. However, for the automatic validation based on the annotations, we'd need to do some more things which would not be so easy to do and would require possibly some discussion.

Possible approaches:

  1. Execute the validation manually inside the code
  2. Having resources (APIs) as a CDI Beans for which the validation is run automatically

I'm inclined more to (2) as it's a recommended way in applications and on Quarkus side and it could simplify a lot of things for us. I'll try to do some prototype on this matter.

mabartos added a commit to mabartos/keycloak that referenced this pull request Aug 5, 2025
mabartos added a commit that referenced this pull request Aug 5, 2025
mabartos added a commit that referenced this pull request Sep 5, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 13, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 13, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 14, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 23, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 24, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 30, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 31, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 31, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Nov 3, 2025
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.

2 participants