-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 DevUI Configuration Editor #43354
base: main
Are you sure you want to change the base?
Improve DevUI Configuration Editor #43354
Conversation
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
acfcbab
to
661dd09
Compare
@radcortez will have to look at this. |
@ueberfuhr i really like where you went with this. It keeps me happy while adding some great value! |
661dd09
to
d62b23c
Compare
🎊 PR Preview bbd2c1e has been successfully built and deployed to https://quarkus-pr-main-43354-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you for the PR!
We shouldn't remove the ability to save a configuration from either system or env to
We shouldn't remove the ability to edit properties from non-active profiles. For instance, you may want to edit properties from the |
@radcortez, this problem is the inconsistence. All configuration properties are loaded by SmallRye, while saving properties is done by the configuration editor's backend. The current (release) behavior is: Storing System Property
|
Sure, I could remove the filter. But if we have the property for |
I don't see the editor as an Yes, suppose you change a System or Env property. In that case, you will still see the original value because the change is persisted in
The In reality, any configuration coming from a source with higher ordinality than Returning to the proposal, locking the System and Env source makes things even more confusing (I admit I may be biased here). The current editor allows you to do things freely, I guess we can call it inconsistently consistent :) The proposed solution will lock in properties depending on their source. So, I may be editing a property, but if I add it to one of those sources, I can't edit it anymore. We could take a step back and think about other ways to improve the situation. We know that
In this way, you know who is overriding, and the editing becomes clear; that is only for
We can create a new Lines 1033 to 1106 in be4817d
Let's try to nail down the other piece first, and then we can figure out what to do here. Thanks! |
Where are we for this one? It looked like an interesting improvement. Is there a plan to finalize this? |
As per my previous comments, we shouldn't remove the ability to save a configuration from System or Env or the ability to edit properties from non-active profiles. But I won't block the changes if everyone agrees that this is acceptable. |
Great and valuable discussion here @radcortez 👍
The Dev UI gives the impression that this should be an editor:
So it is a common use case that developers have their own system properties in their development environment, and they want to "share" them with the team? In case of environment variables, this wouldn't work anyway because of the name mapping (
Just to be clear - with "BuildTime", you mean the build time of a developer's app, not the build time of Quarkus itself? So there are properties, that can be changed while running the developer's app`? How would the changes then get hot-deployed? And, to be honest, I cannot understand why
Okay, was not aware of this.
My thoughts were that when we allow editing and saving the value in the Form Editor, the user would expect to value to be applied to the application and the resulting behavior. By locking it, the user should be aware of that it is not applyable. Instead of clicking the save button, the user could copy the property to the "Source Editor" manually. We could also add a button to save the value to the properties, but without editing the value, just save it with a hint that this would not change anything.
You mean for displaying in the UI? (We could not add the same property twice to the |
That is one use case, yes. Now, we may discuss whether the use is strong enough to consider it or whether we should drop it. I am fine with dropping it, but I would also like to hear other opinions.
Actually, when you set an env var, the EnvSource automatically generates and lists its dotted format name with the same value. As an example, if you set
The configuration does not support reloading. Dev mode may reload Quarkus depending on the configuration change, but that cannot be considered a configuration reload. This source is used by configuration required at build time, and that can't be read at runtime, but changing it has no effect at runtime. That is why it is generated by Quarkus and set at the maximum ordinal, so users cannot override the values.
It could work. I think that to make it consistent, it would have to be applied to any configuration source higher than
Yes. It doesn't have to be there twice. We already load @gsmet @phillip-kruger @maxandersen If you feel otherwise, please let us know, and OK to drop my reservations. Thank you for your patience. |
@radcortez your call. |
@ueberfuhr this looks like a really good contribution and I would really like us to make progress on it. Any chance you could build a plan from @radcortez 's comment and see if you can get on the same page? Thanks! |
Sure, but it would take me some time because of the daily business. 😉 I'll try it for the next 2 weeks. |
- allow editing of properties only for those from `application.properties` - improve UI with more awareness of the config source - add profile-awareness - improve code (simplification and code refactorings) - re-write algorithm to merge existing `application.properties` with single properties update - read `application.properties` the same way like Smallrye Config does (same behavior in case of non-UTF-8 `application.properties`) - add tests for RPC service #resolves 43229
d62b23c
to
15b82fb
Compare
BTW, @phillip-kruger / @radcortez / @gsmet is there any place for internal documentation in the Quarkus repository? I mean, we discuss the concepts in this PR, but these discussions will get lost in the future, and there will be no history of changes made to the concept. And I think this is not an architectural decision that could be placed as an ADR. |
This PR resolves #43229 and the problems described in this issue. Here are the details, what I've changed:
Conceptual Changes
application.properties
application.properties
*
) in their name (wildcards)application.properties
, there's a warning that updating this property will lead to overwriting the raw value (this might be the case when Maven Resource Filtering is used, or when a property is overwritten by an env var)application.properties
,Further UI Changes
Code Changes
getAllValues()
and added information about existence inapplication.properties
to the results of the other calldata-
attributes to get an input field (instead of being dependent from the hierarchy, which doesn't work for the checkboxes)application.properties
is implemented in a separate class (ApplicationPropertiesService
), that is invoked by the RPC service and the processorapplication.properties
with single property updates, which is more robust concerningKnown Restrictions
application.properties
file - usingapplication-<profile>.properties
is not supportedFix #19913