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

Retry the admin token acquisition in DevServices for Keycloak #28294

Merged

Conversation

sberyozkin
Copy link
Member

Hi @gsmet, it is the only try I'd like to make to address both oidc-client-reactive and (re-enabled) oidc-token-propagation-reactive test failures - both fail unexpectedly when an attempt it made to acquire an admin token using the admin:admin default admin credentials provided to Keycloak at startup, with the error message that these credentials are invalid.

The only thing I can think of is that the admin realm/users data have not been initialized yet in Keycloak. Keycloak 19.0.2 (Quarkus based) has done some significant refactorings around the way the various data are handled, so it might explain why. Other tests which use legacy Keycloak 19.0.2 images are not affected with such an error...

So I've just moved the code dedicated to acquiring the admin token in its own function, and added a retry of up to 10 secs to the code which uses a password grant to get such tokens.

Will disable both of these tests if it does not help

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I agree it's worth a try!

@gsmet
Copy link
Member

gsmet commented Sep 29, 2022

@sberyozkin let's not merge it right away. I will orchestrate a few CI runs to ensure it's not failing too often as a first check.

@quarkus-bot

This comment has been minimized.

@sberyozkin
Copy link
Member Author

Thanks @gsmet, I'll merge then once the build completes

@gsmet
Copy link
Member

gsmet commented Sep 30, 2022

@sberyozkin let me run it a few more times, please.

@sberyozkin
Copy link
Member Author

@gsmet Sure, sounds good

@quarkus-bot

This comment has been minimized.

@gsmet gsmet force-pushed the retry_admin_token_acquisition_keycloak branch from 10d0dd5 to f121147 Compare October 1, 2022 16:11
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 1, 2022

Failing Jobs - Building f121147

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

@gsmet
Copy link
Member

gsmet commented Oct 1, 2022

Ok I ran it three times.

Let’s try to merge and see how it goes.

@gsmet gsmet merged commit c8f7d38 into quarkusio:main Oct 1, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 1, 2022
@sberyozkin sberyozkin deleted the retry_admin_token_acquisition_keycloak branch October 10, 2022 10:10
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.2.Final Oct 10, 2022
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

2 participants