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

Improve error feedback for Keycloak dev service startup #28533

Merged
merged 1 commit into from Oct 12, 2022

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Oct 12, 2022

Fixes #25809

I decided to go for something specific because this use case is actually rather specific. We need to somehow be able to propagate errors that are not fatal and actually display the full log in this case.

} else {
LOG.debugf("Realm %s resource is not available", realmPath.get());
errors.add(String.format("Realm %s resource is not available", realmPath.get()));
Copy link
Member Author

Choose a reason for hiding this comment

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

I put the full error message here but it's actually not used, it's just a marker.

@quarkus-bot

This comment has been minimized.

Copy link
Member

@sberyozkin sberyozkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @gsmet, sure, we can accumulate errors this way and add more useful error message along the way, sorry you had to update so many functions to pass the errors list around :-)

@gsmet
Copy link
Member Author

gsmet commented Oct 12, 2022

So just to make it clear: I add the errors there just as flags. The usual logger is used as I don't want to break the flow of the logging (it's important to understand what's going on). So having the errors in the list is just a nice way to say there are errors, please display the logs.

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 12, 2022

Failing Jobs - Building 6b54627

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

@sberyozkin
Copy link
Member

That sounds OK

@sberyozkin sberyozkin merged commit 4342fa4 into quarkusio:main Oct 12, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 12, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.3.Final Oct 17, 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.

Important log message shown during Dev Services for Keycloak initialization is lost
2 participants