-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Ability to enable/disable feature via single property #43542
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
base: main
Are you sure you want to change the base?
Conversation
9d51549
to
3ece80e
Compare
Thank you for taking this on. What do you think of expressing this as:
|
Is this a real issue? I don't think folks need to enable/disable that many features. If they really do I think we should consider something like also supporting a separate file. If the argument is that folks will have many features to enable/disable this just makes it even worse IMO as you basically end up with more crud, not less. |
Is this not also going to bloat the help completely? You'd have --features that list all features, then also additionally have a separate option for each feature? |
We're starting to add a lot of features. We're also not just talking about people trying things out locally. Let's say I've been provided a containerized augmented image. Now I want to try out the new serdes optimization feature. Without knowing the list of features that may already be configured in that augmented image, I cannot simply try out the feature as I may change the feature configuration in unexpected ways.
That will be more difficult to manage from the operator.
I would vote for eventually getting rid of the list based option. |
That's a good point, but would mean we'd need to handle what happens if the same feature is listed multiple times; could be
Please no, that is super convenient and quick to manage if you want to manage enabled/disabled features in one go, which at least personally is what I want |
Okay, so @shawkins convinced me that we probably should do this; I do like Another thing I'd like to know is how this will look like in the CLI help, and the guide docs needs updating as well. One proposal would be that help would not list all the Could we do some separate help command for features? That lists all the features, their description, etc? Something similar to what the guide does? |
Yep, it might be nice. The So, the approach suggested by @shawkins would look like this:
And potentially, as suggested by @stianst, enable the feature like
The help will be clean. There will be only one option (called wildcard option) that accepts feature names - sth like the
Yes, it's on our radar as well as it'd be nice to have the capability of listing features in the distribution itself with some more information + maybe even info whether the feature is enabled or not for already augmented distro. I'll create an issue for this.
I think these 2 approaches can coexist as you can override the feature state by using this new option. |
That would need to be done separately. There are several places in our code where we make the assumption that our options must have an argument.
Ok, sounds like the concensus is to keep both and just add docs around precedence.
Another current behavior worth mentioning is that a feature cannot appear in both features and features-disabled - which has usability issue from an overriding perspective because you may need to override both lists. Otherwise the presedence order for sources in general is:
We'd check first for the value of kc.feature-name, then fallback to the list handling. This makes features and features-disabled more akin to "default" feature handling as once you use feature-name, then features and features-disabled aren't applicible to that feature. |
Exactly. I would not rush this. It is a new concept that we'd allow value-less config options.
+1 It'd be on par with current |
af25c06
to
8154c16
Compare
25c913d
to
39a1610
Compare
Created a follow-up task for the old testsuite: Not sure if it's worth the effort though. |
common/src/main/java/org/keycloak/common/profile/SingleProfileConfigResolver.java
Show resolved
Hide resolved
Closes keycloak#43541 Signed-off-by: Martin Bartoš <[email protected]>
Signed-off-by: Martin Bartoš <[email protected]>
@shawkins This is the initial form of how it could work with the single property.