Repository navigation
Do not report clustered caches without configuration in the server info - #55573
Open
costa-chown wants to merge 1 commit into
Open
costa-chown wants to merge 1 commit into
costa-chown wants to merge 1 commit into
Conversation
login-failures:v2 removes the loginFailures cache and stateless removes all clustered caches but work. addEmbeddedOperationalInfo still asked Infinispan for their health, and Infinispan reports a cache it does not know as FAILED, so the server info showed loginFailures:Cache FAILED on a healthy cluster. Only caches with a configuration are reported now. Closes keycloak#55572 Signed-off-by: Konstantin Kauz <konstantin.kauz@opendefense.cloud>
1 task done
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change excluding unconfigured embedded caches from server info.
No open issues 🎉
What changed in this PR
Fixes #55572 by excluding unconfigured embedded caches from server info, preventing misleading FAILED statuses when features such as login-failures:v2 or stateless remove caches.
Changes:
- Filters clustered cache names by configuration existence before requesting health.
- Adds unit coverage for omitted caches and healthy configured caches.
- Extends the server-info integration test to reject
FAILEDoperational values.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/admin/ServerInfoTest.java |
Checks that Infinispan operational info contains no FAILED values. |
model/infinispan/src/test/java/org/keycloak/connections/infinispan/EmbeddedOperationalInfoTest.java |
Verifies unconfigured loginFailures is omitted while configured caches remain healthy. |
model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java |
Filters unconfigured caches and extracts a package-private helper for testing. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55572
login-failures:v2(default) removes theloginFailurescache, andstatelessremoves all clustered caches butwork.addEmbeddedOperationalInfostill asked Infinispan for the health of every name inCLUSTERED_CACHE_NAMES. Infinispan answers withInvalidCacheHealthfor a cache it does not know, whose status is alwaysFAILED, so the server info (admin console: Realm info → Provider info →connectionsInfinispan) showedloginFailures:Cache: FAILEDon a healthy cluster.Only caches with a configuration are reported now (
cacheManager::cacheConfigurationExists, asaddShutdownListenersalready does). The status of the other caches is unchanged.Tests
EmbeddedOperationalInfoTest: all clustered caches butloginFailuresdefined;loginFailuresis not reported, the others areHEALTHY, no value isFAILED. It fails without the change.ServerInfoTest: no value ofconnectionsInfinispanisFAILED.jdbc-ping): the server info lists the seven other caches asHEALTHYwithclusterSize: 3and nologinFailuresentry; before,loginFailures:CachewasFAILEDwith one and with three instances.