-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Create CacheEmbeddedConfigProvider #39126
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
Conversation
650cd5e to
9ba029c
Compare
|
Failing FIPS tests have been fixed in #39125 |
9ba029c to
42075c3
Compare
ahus1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, see pruivo#8 for two changes:
- Removal of some files which are IMHO not part of the public API, and I also don't see how they are being used.
- I saw you added an option to disable the ISPN metrics. IMHO this wasn't available earlier. When we add it, I want to make this option explicit and documented in the CLI. I moved it to the other metrics open that we have for the embedded caches, so they are in a similar place.
See pruivo#8 for the two commits.
Once these items are resolve, I'm happy to merge it.
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
docs/documentation/upgrading/topics/changes/changes-26_3_0.adoc
Outdated
Show resolved
Hide resolved
|
CLI option It is not a new option, it is a bridge to map the The current code is reacting to this option to enable the metrics in Infinispan Line 145 in c97a956
But the option is already mapped to a quarkus option here Lines 17 to 19 in 3839f8e
Steven may implement another alternative to get rid of the mapping: Site Name
keycloak/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java Lines 61 to 65 in 4dc4de7
Multi-site has never used the site's name value. There is no clustering and all the events use keycloak/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/WrapperClusterEvent.java Line 65 in bf26d33
It was used by the code that Michal removed and, at the moment has no use. It will become relevant for stretched clusters. This PR changes Node Name
keycloak/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java Lines 68 to 75 in 4dc4de7
I'm changing quite a bit in the PR
@ahus1 I hope this clarifies my decision in this PR. |
Closes keycloak#38497 Signed-off-by: Pedro Ruivo <[email protected]>
Signed-off-by: Pedro Ruivo <[email protected]>
42075c3 to
515a858
Compare
Thanks, this explains it. A comment would have been helpful to state that "why" it was added. If you think exposing it adds value and would be a feature, consider picking my changes from the other PR. I leave that up to you. |
Signed-off-by: Alexander Schwartz <[email protected]>
| /** | ||
| * @deprecated to be removed without replacement. | ||
| */ | ||
| @Deprecated(since = "26.3", forRemoval = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecated methods in this class (and others) are not used internally anymore. @ahus1 @pruivo What's the policy for deprecating/removing classes in the model modules. Should all code in this module be considered public API or just interfaces? I don't see a package-info.java so it's not clear to me what the expectations are here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically we are allowed to change them in any release, as they are not considered public. Sometimes it is still nice to keep them around for a while if we think people might use them anyway and to allow them a smoother migration.
I assume keeping this methods comes only at the cost that we would need to have an extra PR later to actually remove the code.
I'll leave that final call with @pruivo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not clear what is public API and what users are using (I'm aware some users are creating caches for their providers). I'm playing safe and keeping them around and removing them in 26.4 or 26.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine by me. I see we're now making better use of impl.* packages, so in the future hopefully what is/isn't supported will be clearer.
|
|
||
| @Override | ||
| public Set<Class<? extends Provider>> dependsOn() { | ||
| return Set.of(JGroupsCertificateProvider.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to these changes per se, but I noticed that RemoteLoadBalancerCheckProviderFactory depends on InfinispanConnectionProvider but does not have a dependsOn implementation. Is there a reason for this, or should I create an issue to address this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it is because dependsOn() method was added after RemoteLoadBalancerCheckProviderFactory.
This is a "lazy provider" and is only instantiated when the REST endpoint is invoked.
Closes #38497
Notes
DefaultInfinispanConnectionProviderFactory#initEmbedded()-> it was used by the store model tests.DefaultCacheEmbeddedConfigProviderFactoryCacheConfiguratorhas the logic to configure caches based on CLI options;JGroupsConfiguratoris the same for the JGroups configuration. Trying to keep the classDefaultCacheEmbeddedConfigProviderFactorysmall and easy to read.Tasks